[PATCH] A couple minor changes to support sanitizers on FreeBSD 9.2

Alexey Samsonov samsonov at google.com
Tue Mar 11 01:41:06 PDT 2014


  I think asan_linux.cc should be committed separately.


================
Comment at: lib/asan/tests/CMakeLists.txt:38
@@ +37,3 @@
+# System headers incorrectly define 'size_t' as 'unsigned long' on
+# x64 FreeBSD 9.2 whereas 'unsigned int' is expected.
+if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE" AND
----------------
Ed Maste wrote:
> This comment could use more clarity; presumably you meant to add "in 32-bit mode"?
> 
> 
Can we instead #define _SIZE_T_DECLARED in source files? Maybe we can add this to lib/sanitizer_common/tests/sanitizer_test_utils.h

================
Comment at: lib/asan/asan_linux.cc:42
@@ -41,1 +41,3 @@
 
+// x64 FreeBSD 9.2 and older define 64-bit register names in both 64-bit
+// and 32-bit modes.
----------------
Do you mean x86_64?


http://llvm-reviews.chandlerc.com/D3031



More information about the llvm-commits mailing list