[compiler-rt] r287791 - [asan/win] Skip incremental linker padding during unregistration
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 10:28:04 PST 2016
Author: rnk
Date: Wed Nov 23 12:28:04 2016
New Revision: 287791
URL: http://llvm.org/viewvc/llvm-project?rev=287791&view=rev
Log:
[asan/win] Skip incremental linker padding during unregistration
Should fix issues that came up while testing Win64 ASan.
Modified:
compiler-rt/trunk/lib/asan/asan_globals.cc
Modified: compiler-rt/trunk/lib/asan/asan_globals.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_globals.cc?rev=287791&r1=287790&r2=287791&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_globals.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_globals.cc Wed Nov 23 12:28:04 2016
@@ -372,6 +372,11 @@ void __asan_unregister_globals(__asan_gl
if (!flags()->report_globals) return;
BlockingMutexLock lock(&mu_for_globals);
for (uptr i = 0; i < n; i++) {
+ if (SANITIZER_WINDOWS && globals[i].beg == 0) {
+ // Skip globals that look like padding from the MSVC incremental linker.
+ // See comment in __asan_register_globals.
+ continue;
+ }
UnregisterGlobal(&globals[i]);
}
}
More information about the llvm-commits
mailing list