aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2022-08-26 18:20:34 +0000
committerLeonard Chan <leonardchan@google.com>2022-08-26 18:21:40 +0000
commit93e5cf6b9c08d99cf7cefc0adda346bd7ba56049 (patch)
treed3796ab2773a585062d240c2dc09a00405eb0926 /clang/lib/Frontend/CompilerInstance.cpp
parentc58791c286e0b0feba04711e973bf7b4871d1dfb (diff)
downloadllvm-93e5cf6b9c08d99cf7cefc0adda346bd7ba56049.zip
llvm-93e5cf6b9c08d99cf7cefc0adda346bd7ba56049.tar.gz
llvm-93e5cf6b9c08d99cf7cefc0adda346bd7ba56049.tar.bz2
[clang] Do not instrument relative vtables under hwasan
Full context in https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=107017. Instrumenting hwasan with globals results in a linker error under the relative vtables abi: ``` ld.lld: error: libunwind.cpp:(.rodata..L_ZTVN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_15Registers_arm64EEE.hwasan+0x8): relocation R_AARCH64_PLT32 out of range: 6845471433603167792 is not in [-2147483648, 2147483647]; references libunwind::AbstractUnwindCursor::~AbstractUnwindCursor() >>> defined in libunwind/src/CMakeFiles/unwind_shared.dir/libunwind.cpp.obj ``` This is because the tag is included in the vtable address when calculating the offset between the vtable and virtual function. A temporary solution until we can resolve this is to just disable hwasan instrumentation on relative vtables specifically, which can be done in the frontend. Differential Revision: https://reviews.llvm.org/D132425
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions