[libc-commits] [libc] [libc][LIBC_ADD_NULL_CHECKS] replace volatile deref with __builtin_trap (PR #123401)

via libc-commits libc-commits at lists.llvm.org
Fri Jan 17 13:31:58 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));
----------------
lntue wrote:

Shall we just make it expect death without any specific signal?

https://github.com/llvm/llvm-project/pull/123401


More information about the libc-commits mailing list