diff options
author | Nick Desaulniers <nickdesaulniers@users.noreply.github.com> | 2025-01-22 09:34:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-22 09:34:59 -0800 |
commit | 8e79ade49d68c49aeb8ba008b59f559b86d22765 (patch) | |
tree | 127f0b9ff22c9b230d402c322a1022bea92512a4 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | ddb8607fe8b0b74a6d89c79d4fcc158673ac765a (diff) | |
download | llvm-8e79ade49d68c49aeb8ba008b59f559b86d22765.zip llvm-8e79ade49d68c49aeb8ba008b59f559b86d22765.tar.gz llvm-8e79ade49d68c49aeb8ba008b59f559b86d22765.tar.bz2 |
[libc][LIBC_ADD_NULL_CHECKS] replace volatile deref with __builtin_trap (#123401)
Also, update the unit tests that were checking for SIGSEGV to not check for a
specific signal.
To further improve this check, it may be worth:
- renaming the configuration option/macro/docs to be clearer about intent.
- swap __builtin_trap for __builtin_unreachable, removing the preprocessor
variants of LIBC_CRASH_ON_NULLPTR, then unconditionally using
`-fsanitize=unreachable -fsanitize-trap=unreachable` in cmake flags when
LIBC_ADD_NULL_CHECKS is enabled.
- building with `-fno-delete-null-pointer-checks` when LIBC_ADD_NULL_CHECKS (or
when some larger yet to be added hardening config) is enabled.
Link: #111546
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
0 files changed, 0 insertions, 0 deletions