[PATCH] Add FreeBSD support to Asan test cases that use mmap() with MAP_ANON

Ed Maste emaste at freebsd.org
Thu Jul 17 08:07:22 PDT 2014


================
Comment at: test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc:30
@@ -29,2 +29,3 @@
 
-  char *q = (char *)mmap(p, kPageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, 0, 0);
+  // FreeBSD requires fd to be (-1) when MAP_ANON is specified.
+#if defined(__FreeBSD__)
----------------
Do the other platforms require it to be 0?  Can it just be -1 for all?

http://reviews.llvm.org/D4561






More information about the llvm-commits mailing list