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

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 14:26:48 PDT 2016


kcc 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;
----------------
etienneb wrote:
> 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.
Sure, but please make it a separate change. 
I am totally fine to just ignore all the functions that start with __asan_


https://reviews.llvm.org/D23354





More information about the llvm-commits mailing list