[PATCH] D12819: [compiler-rt] [sanitizers] Move CheckVMASize after flag initialization
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 06:31:05 PDT 2015
zatrazz updated this revision to Diff 34626.
zatrazz added a comment.
Update patch with CheckVMASize remove from __asan_init and add the tsan one.
http://reviews.llvm.org/D12819
Files:
lib/asan/asan_rtl.cc
lib/dfsan/dfsan.cc
lib/msan/msan.cc
lib/tsan/rtl/tsan_rtl.cc
Index: lib/tsan/rtl/tsan_rtl.cc
===================================================================
--- lib/tsan/rtl/tsan_rtl.cc
+++ lib/tsan/rtl/tsan_rtl.cc
@@ -312,9 +312,6 @@
if (is_initialized)
return;
is_initialized = true;
-
- CheckVMASize();
-
// We are not ready to handle interceptors yet.
ScopedIgnoreInterceptors ignore;
SanitizerToolName = "ThreadSanitizer";
@@ -325,6 +322,7 @@
const char *options = GetEnv(kTsanOptionsEnv);
CacheBinaryName();
InitializeFlags(&ctx->flags, options);
+ CheckVMASize();
#ifndef SANITIZER_GO
InitializeAllocator();
#endif
Index: lib/msan/msan.cc
===================================================================
--- lib/msan/msan.cc
+++ lib/msan/msan.cc
@@ -375,12 +375,13 @@
msan_init_is_running = 1;
SanitizerToolName = "MemorySanitizer";
- CheckVMASize();
-
InitTlsSize();
CacheBinaryName();
InitializeFlags();
+
+ CheckVMASize();
+
__sanitizer_set_report_path(common_flags()->log_path);
InitializeInterceptors();
Index: lib/dfsan/dfsan.cc
===================================================================
--- lib/dfsan/dfsan.cc
+++ lib/dfsan/dfsan.cc
@@ -399,6 +399,8 @@
}
static void dfsan_init(int argc, char **argv, char **envp) {
+ InitializeFlags();
+
CheckVMASize();
MmapFixedNoReserve(kShadowAddr, kUnusedAddr - kShadowAddr);
@@ -412,7 +414,6 @@
if (!(init_addr >= kUnusedAddr && init_addr < kAppAddr))
MmapNoAccess(kUnusedAddr, kAppAddr - kUnusedAddr);
- InitializeFlags();
InitializeInterceptors();
// Register the fini callback to run when the program terminates successfully
Index: lib/asan/asan_rtl.cc
===================================================================
--- lib/asan/asan_rtl.cc
+++ lib/asan/asan_rtl.cc
@@ -377,6 +377,8 @@
// initialization steps look at flags().
InitializeFlags();
+ CheckVMASize();
+
AsanCheckIncompatibleRT();
AsanCheckDynamicRTPrereqs();
@@ -585,7 +587,6 @@
// Initialize as requested from instrumented application code.
// We use this call as a trigger to wake up ASan from deactivated state.
void __asan_init() {
- CheckVMASize();
AsanActivate();
AsanInitInternal();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12819.34626.patch
Type: text/x-patch
Size: 2197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150912/187c5aab/attachment.bin>
More information about the llvm-commits
mailing list