[all-commits] [llvm/llvm-project] 5e0179: [libc] Don't rely on LIBC_HAS_SANITIZER when enabl...
Alexey Samsonov via All-commits
all-commits at lists.llvm.org
Thu Jul 24 14:16:07 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5e01797cd035cd1b86beb0ad3fb24277531dff66
https://github.com/llvm/llvm-project/commit/5e01797cd035cd1b86beb0ad3fb24277531dff66
Author: Alexey Samsonov <vonosmas at gmail.com>
Date: 2025-07-24 (Thu, 24 Jul 2025)
Changed paths:
M libc/src/__support/macros/CMakeLists.txt
M libc/src/__support/macros/null_check.h
M libc/src/__support/macros/sanitizer.h
M libc/test/src/math/smoke/CMakeLists.txt
M libc/test/src/math/smoke/nan_test.cpp
M libc/test/src/math/smoke/nanf128_test.cpp
M libc/test/src/math/smoke/nanf16_test.cpp
M libc/test/src/math/smoke/nanf_test.cpp
M libc/test/src/math/smoke/nanl_test.cpp
M libc/test/src/stdfix/IdivTest.h
M libc/test/src/string/memchr_test.cpp
M libc/test/src/string/memcmp_test.cpp
M libc/test/src/string/memcpy_test.cpp
M libc/test/src/string/memmove_test.cpp
M libc/test/src/string/mempcpy_test.cpp
M libc/test/src/string/memrchr_test.cpp
M libc/test/src/string/memset_test.cpp
M libc/test/src/string/stpncpy_test.cpp
M libc/test/src/string/strcat_test.cpp
M libc/test/src/string/strcoll_test.cpp
M libc/test/src/string/strcpy_test.cpp
M libc/test/src/string/strsep_test.cpp
M libc/test/src/string/strspn_test.cpp
M libc/test/src/wchar/wcpncpy_test.cpp
M libc/test/src/wchar/wcscmp_test.cpp
M libc/test/src/wchar/wcsncmp_test.cpp
M libc/test/src/wchar/wcspbrk_test.cpp
M libc/test/src/wchar/wcsrchr_test.cpp
M libc/test/src/wchar/wmemcmp_test.cpp
M libc/test/src/wchar/wmemmove_test.cpp
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list