[asan] Do not instrument special purpose LLVM sections.
authorAnna Zaks <ganna@apple.com>
Thu, 25 Jun 2015 23:35:48 +0000 (23:35 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 25 Jun 2015 23:35:48 +0000 (23:35 +0000)
commitead297bb0483223f42f039fb742083ea02b0aa3b
tree7b583cec298a0ff16b623858e9af57be31d647f1
parentf291e057a4f9b518125ba2c3f5f336a7c313cfa4
[asan] Do not instrument special purpose LLVM sections.

Do not instrument globals that are placed in sections containing "__llvm"
in their name.

This fixes a bug in ASan / PGO interoperability. ASan interferes with LLVM's
PGO, which places its globals into a special section, which is memcpy-ed by
the linker as a whole. When those goals are instrumented, ASan's memcpy wrapper
reports an issue.

http://reviews.llvm.org/D10541

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240723 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata-darwin.ll
test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata.ll