[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)
Thurston Dang via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 3 19:58:42 PDT 2025
thurstond wrote:
> Trap checks fail at most once (when the program crashes).
It's technically possible to have a signal handler that consumes SIGILL and then jumps over the offending instruction. The UBSan docs allude to this: "-fsanitize-trap=...: execute a trap instruction (doesn’t require UBSan run-time support). If the signal is not caught, the program will typically terminate due to a SIGILL or SIGTRAP signal." (https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)
That said, I agree that it is extremely likely the trap only happens once.
https://github.com/llvm/llvm-project/pull/134310
More information about the cfe-commits
mailing list