[compiler-rt] Avoid instrumenting sanitizer functions
authorEtienne Bergeron <etienneb@google.com>
Wed, 14 Sep 2016 17:18:37 +0000 (17:18 +0000)
committerEtienne Bergeron <etienneb@google.com>
Wed, 14 Sep 2016 17:18:37 +0000 (17:18 +0000)
commit752f8839a4eb3d00a8f788c15a4732484e9a957d
tree0a9debdfcd21ce14d08105b9578f3f5b91ff944e
parenta369219ce676ae960046ef00d6d23be2d10701ee
[compiler-rt] Avoid instrumenting sanitizer functions

Summary:
Function __asan_default_options is called by __asan_init before the
shadow memory got initialized. Instrumenting that function may lead
to flaky execution.

As the __asan_default_options is provided by users, we cannot expect
them to add the appropriate function atttributes to avoid
instrumentation.

Reviewers: kcc, rnk

Subscribers: dberris, chrisha, llvm-commits

Differential Revision: https://reviews.llvm.org/D24566

llvm-svn: 281503
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-sanitizers.ll [new file with mode: 0644]