[all-commits] [llvm/llvm-project] 5582a7: [TargetMachine] Set dso_local if asan is detected
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Dec 5 17:56:02 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5582a7987662a92eda5d883b88fc4586e755acf5
https://github.com/llvm/llvm-project/commit/5582a7987662a92eda5d883b88fc4586e755acf5
Author: Fangrui Song <i at maskray.me>
Date: 2020-12-05 (Sat, 05 Dec 2020)
Changed paths:
M llvm/lib/Target/TargetMachine.cpp
Log Message:
-----------
[TargetMachine] Set dso_local if asan is detected
AddressSanitizer instrumentation does not set dso_local on non-thread-local
global variables in -fno-pic and it seems to rely on implied dso_local to work.
Add a hack until we have fixed AddressSanitizer to call setDSOLocal() as
appropriate.
Thanks to Vitaly Buka for reporting the issue and suggesting the way to detect asan.
More information about the All-commits
mailing list