[llvm] r209790 - [ASan] Hoist blacklisting globals from init-order checking to Clang.

Alexey Samsonov vonosmas at gmail.com
Wed May 28 18:44:13 PDT 2014


Author: samsonov
Date: Wed May 28 20:44:13 2014
New Revision: 209790

URL: http://llvm.org/viewvc/llvm-project?rev=209790&view=rev
Log:
[ASan] Hoist blacklisting globals from init-order checking to Clang.

Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=209790&r1=209789&r2=209790&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed May 28 20:44:13 2014
@@ -1069,8 +1069,6 @@ bool AddressSanitizerModule::runOnModule
     // Determine whether this global should be poisoned in initialization.
     bool GlobalHasDynamicInitializer =
         DynamicallyInitializedGlobals.Contains(G);
-    // Don't check initialization order if this global is blacklisted.
-    GlobalHasDynamicInitializer &= !BL->isIn(*G, "init");
 
     StructType *NewTy = StructType::get(Ty, RightRedZoneTy, NULL);
     Constant *NewInitializer = ConstantStruct::get(





More information about the llvm-commits mailing list