[ASan] Make insertion of version mismatch guard configurable
commitb35a6f3e1a30f813031dc1cec9d650a736b4b23a
authorJulian Lettner <jlettner@apple.com>
Wed, 28 Aug 2019 20:40:55 +0000 (28 20:40 +0000)
committerJulian Lettner <jlettner@apple.com>
Wed, 28 Aug 2019 20:40:55 +0000 (28 20:40 +0000)
tree346c99dd45def6eba89c6e2786536012e0dd1c52
parent7a0044c42024c69a05cc71af75e104947c7141ca
[ASan] Make insertion of version mismatch guard configurable

By default ASan calls a versioned function
`__asan_version_mismatch_check_vXXX` from the ASan module constructor to
check that the compiler ABI version and runtime ABI version are
compatible. This ensures that we get a predictable linker error instead
of hard-to-debug runtime errors.

Sometimes, however, we want to skip this safety guard. This new command
line option allows us to do just that.

rdar://47891956

Reviewed By: kubamracek

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370258 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/version-mismatch-check.ll [new file with mode: 0644]