[libc-commits] [libc] [llvm] [libc] Decouple LIBC_ASSERT failure handling and raise SIGABRT in full-build mode (PR #239277)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Wed Nov 11 00:53:46 PST 2026


================
@@ -227,11 +227,7 @@ TEST(LlvmLibcCheckedPtrTest, TakeUnique) {
 
 #if !defined(NDEBUG) && LIBC_TEST_SUBPROCESS_TESTS
 
-#if defined(LIBC_FULL_BUILD) && !defined(LIBC_COPT_USE_C_ASSERT)
-#define EXPECT_ASSERT_FAILS(stmt) EXPECT_EXITS(stmt, 255)
-#else
 #define EXPECT_ASSERT_FAILS(stmt) EXPECT_DEATH(stmt, WITH_SIGNAL(-1))
----------------
labath wrote:

At this point, I think you can just inline this macro. It may make sense to define something like this in common code, but that's a separate patch.

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


More information about the libc-commits mailing list