[PATCH] Make sure globals created by UBSan are not instrumented by ASan.

Richard Smith richard at metafoo.co.uk
Thu Jul 17 17:38:10 PDT 2014


================
Comment at: lib/CodeGen/CGExpr.cpp:2179-2180
@@ +2178,4 @@
+  if (PLoc.isValid()) {
+    auto FilenameGV = CGM.GetAddrOfConstantCString(PLoc.getFilename(), ".src");
+    CGM.disableSanitizerForGlobal(FilenameGV);
+    Filename = FilenameGV;
----------------
I'm concerned about this one: these strings may be shared by other parts of the program, where ASan instrumentation is important. How much does instrumenting these strings cost us?

http://reviews.llvm.org/D4575






More information about the cfe-commits mailing list