[PATCH] [ASan/Win] Fix PR22545 __asan_unregister_globals is not called when using -MD runtimes

Timur Iskhodzhanov timurrrr at google.com
Tue Feb 17 07:01:03 PST 2015


================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1286
@@ +1285,3 @@
+  // On other platforms, just append a call to the module dtors.
+  if (Triple(M.getTargetTriple()).isOSWindows()) {
+    Function *AtExit = checkInterfaceFunction(M.getOrInsertFunction(
----------------
samsonov wrote:
>   if (TargetTriple.isOSWindows()) { ... }
Done.
I actually made a step further and used a condition from `MCObjectFileInfo::InitCOFFMCObjectFileInfo()` that controls the section to use for `global_dtors` instead.

http://reviews.llvm.org/D7597

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list