llvm-project
5e01797c - [libc] Don't rely on LIBC_HAS_SANITIZER when enabling null checks. (#150341)

Commit
145 days ago
[libc] Don't rely on LIBC_HAS_SANITIZER when enabling null checks. (#150341) LIBC_HAS_SANITIZER (which is defined if ASan, MSan, or UBSan is enabled) is currently used to implicitly disable null checks, normally enabled via LIBC_ADD_NULL_CHECKS config value. Remove this condition, and rely purely on the config value instead: * LIBC_HAS_SANITIZER will be true even for UBSan modes which doesn't rely on null checks at all (e.g. -fsanitize=alignment) * null checks today (implemented via __builtin_trap) should function normally today even when sanitizer is enabled - trap is still a trap * tests have been migrated to WITH_SIGNAL(-1) which doesn't prescript a particular signal / exit-code, and thus should pass even if sanitizers override the default ones.
Author
Parents
Loading