[compiler-rt] r228871 - [Sanitizers] The MAP_NORESERVE define has been removed in FreeBSD 11.x,

Dimitry Andric dimitry at andric.com
Wed Feb 11 11:48:27 PST 2015


Author: dim
Date: Wed Feb 11 13:48:27 2015
New Revision: 228871

URL: http://llvm.org/viewvc/llvm-project?rev=228871&view=rev
Log:
[Sanitizers] The MAP_NORESERVE define has been removed in FreeBSD 11.x,
and even before that, it was never implemented.  Just define it to zero
instead, so compiler-rt can compile on FreeBSD 11 and later.

Differential Revision: http://reviews.llvm.org/D7485

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc?rev=228871&r1=228870&r2=228871&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc Wed Feb 11 13:48:27 2015
@@ -30,6 +30,13 @@
 #include <sys/personality.h>
 #endif
 
+#if SANITIZER_FREEBSD
+// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before
+// that, it was never implemented.  So just define it to zero.
+#undef  MAP_NORESERVE
+#define MAP_NORESERVE 0
+#endif
+
 namespace __sanitizer {
 
 // ------------- sanitizer_common.h





More information about the llvm-commits mailing list