OSDN Git Service

[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)
commit24624732a090d9917d0e75f4dd97136c39132c4a
tree5a960041a5b93540c3f55c690f8354984e0ef664
parentc348bc4aeb7473aa4ad1745657a6063039f6612c
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281503 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/do-not-instrument-sanitizers.ll [new file with mode: 0644]