[libc-commits] [libc] [libc][LIBC_ADD_NULL_CHECKS] replace volatile deref with __builtin_trap (PR #123401)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Jan 17 13:33:11 PST 2025
================
@@ -44,8 +44,8 @@ TEST_F(LlvmLibcNanTest, RandomString) {
run_test("123 ", 0x7ff8000000000000);
}
-#if !defined(LIBC_HAS_ADDRESS_SANITIZER) && defined(LIBC_TARGET_OS_IS_LINUX)
+#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER)
TEST_F(LlvmLibcNanTest, InvalidInput) {
- EXPECT_DEATH([] { LIBC_NAMESPACE::nan(nullptr); }, WITH_SIGNAL(SIGSEGV));
+ EXPECT_DEATH([] { LIBC_NAMESPACE::nan(nullptr); }, WITH_SIGNAL(SIGILL));
----------------
nickdesaulniers wrote:
And remove the preprocessor guards, too?
https://github.com/llvm/llvm-project/pull/123401
More information about the libc-commits
mailing list