[PATCH] D15642: [asan] Use private aliases for global variables (LLVM part).

Yury Gribov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 12:51:56 PST 2016


ygribov added inline comments.

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1399
@@ +1398,3 @@
+
+    if (ClUsePrivateAliasForGlobals) {
+      // Create local alias for NewGlobal to avoid crash on ODR between
----------------
Would it make sense to disable this on platforms that don't have aliases (Windows and maybe OSX)?

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1408
@@ +1407,3 @@
+      // _odr_genXXX to detect ODR violation.
+      auto *ODRIndicatorSym =
+          new GlobalVariable(M, IRB.getInt8Ty(), false, Linkage,
----------------
Perhaps just reuse ODRIndicator here?


Repository:
  rL LLVM

http://reviews.llvm.org/D15642





More information about the llvm-commits mailing list