[llvm-commits] [compiler-rt] r156741 - /compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc

Dmitry Vyukov dvyukov at google.com
Sun May 13 07:24:47 PDT 2012


Author: dvyukov
Date: Sun May 13 09:24:46 2012
New Revision: 156741

URL: http://llvm.org/viewvc/llvm-project?rev=156741&view=rev
Log:
tsan: fix mmap fd
This is mostly to test my commit access.
Fixes fd passed to mmap(), -1 is the proper invalid fd.


Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc?rev=156741&r1=156740&r2=156741&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc Sun May 13 09:24:46 2012
@@ -130,7 +130,7 @@
       kLinuxShadowEnd - kLinuxShadowBeg,
       PROT_READ | PROT_WRITE,
       MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE,
-      0, 0);
+      -1, 0);
   if (shadow != kLinuxShadowBeg) {
     Printf("FATAL: ThreadSanitizer can not mmap the shadow memory\n");
     Printf("FATAL: Make sure to compile with -fPIE and to link with -pie.\n");





More information about the llvm-commits mailing list