[compiler-rt] r287634 - tsan: fix build after 287632

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 03:09:35 PST 2016


Author: dvyukov
Date: Tue Nov 22 05:09:35 2016
New Revision: 287634

URL: http://llvm.org/viewvc/llvm-project?rev=287634&view=rev
Log:
tsan: fix build after 287632

1. Mac does not have MAP_32BIT.
Define it to 0 if it is not defined.

2. We are lacking nolibc stub for ListOfModules::init.
Add it.


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc
    compiler-rt/trunk/test/tsan/ignore_lib5.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc?rev=287634&r1=287633&r2=287634&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc Tue Nov 22 05:09:35 2016
@@ -29,4 +29,8 @@ void Abort() { internal__exit(1); }
 void SleepForSeconds(int seconds) { internal_sleep(seconds); }
 #endif // !SANITIZER_WINDOWS
 
+#if !SANITIZER_WINDOWS && !SANITIZER_MAC
+void ListOfModules::init() {}
+#endif
+
 }  // namespace __sanitizer

Modified: compiler-rt/trunk/test/tsan/ignore_lib5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib5.cc?rev=287634&r1=287633&r2=287634&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib5.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib5.cc Tue Nov 22 05:09:35 2016
@@ -23,6 +23,10 @@
 #include <string>
 #include "test.h"
 
+#ifndef MAP_32BIT
+# define MAP_32BIT 0
+#endif
+
 void *thr(void *arg) {
   // This thread creates lots of separate mappings in /proc/self/maps before
   // the ignored library.




More information about the llvm-commits mailing list