[PATCH] D23354: [compiler-rt] Support dynamic shadow address instrumentation

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 10:52:03 PDT 2016


etienneb added inline comments.

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1817
@@ +1816,3 @@
+    instrumenting = false;
+  if (F.getName().find("__asan_") != std::string::npos)
+    instrumenting = false;
----------------
kcc wrote:
> Why is this here? 
> It looks like it belongs to another change. If so, please make a separate CL. 
Since the code is using a dynamic shadow, I've found a flaky bug hidden below layers.
IIRC, there is a call to `__asan_default_options` at the beginning of __asan_init, BEFORE the shadow initialization.
To avoid the bug, users should add the appropriate attribute to avoid instrumentation of that function, which is error prone.

This is a way to avoid instrumenting these functions.
I'm not proud of that fix, and willing to other proposition.
Like, maybe only banning a fixed set.


https://reviews.llvm.org/D23354





More information about the llvm-commits mailing list