[compiler-rt] r238995 - [asan] Fix undefined MAP_NORESERVE on FreeBSD.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Jun 3 17:42:15 PDT 2015
Author: eugenis
Date: Wed Jun 3 19:42:15 2015
New Revision: 238995
URL: http://llvm.org/viewvc/llvm-project?rev=238995&view=rev
Log:
[asan] Fix undefined MAP_NORESERVE on FreeBSD.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc?rev=238995&r1=238994&r2=238995&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc Wed Jun 3 19:42:15 2015
@@ -35,6 +35,13 @@
#include <sys/stat.h>
#include <unistd.h>
+#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 {
u32 GetUid() {
More information about the llvm-commits
mailing list