[all-commits] [llvm/llvm-project] 2d5fb2: [ubsan] Support static linking with standalone run...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Feb 14 10:50:37 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2d5fb27db71b57f299793160181ef28fea5573e7
https://github.com/llvm/llvm-project/commit/2d5fb27db71b57f299793160181ef28fea5573e7
Author: Fangrui Song <i at maskray.me>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M compiler-rt/lib/ubsan/ubsan_signals_standalone.cpp
M compiler-rt/test/ubsan/TestCases/Misc/Linux/static-link.cpp
Log Message:
-----------
[ubsan] Support static linking with standalone runtime (#80943)
The standalone runtime (not
-fsanitize-minimal-runtime/-fsanitize-trap=undefined) installs some
signal handlers using `real_sigaction`. With static linking
(-static/-static-pie), the called `REAL(sigaction)` is null, leading to
an immediate segfault, which is confusing (#51538).
Fix #51538 by bailing out.
`// REQUIRES: librt_has_multf3` from https://reviews.llvm.org/D109709
actually disabled the test because `librt_has_*` features are only for
`compiler-rt/test/builtins`. The test does not reproduce for me:
libclang_rt.builtins.a or libgcc. Revert the REQUIRES.
More information about the All-commits
mailing list