[libcxx-commits] [libcxx] [libc++] Disable SSP in `clear_padding.pass.cpp` (PR #218130)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 9 05:30:26 PDT 2026
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/218130
>From 566abe37b4a107b6c27304fa04c4b3a74dec4632 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Sat, 22 Aug 2026 15:46:00 +0200
Subject: [PATCH 1/2] [libc++] Disable SSP in `clear_padding.pass.cpp`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compile `clear_padding.pass.cpp` test `-fno-stack-protector` to fix
crash due to the generated code overflowing the buffer. This is most
likely a bug in clang.
Bug: https://github.com/llvm/llvm-project/issues/212002
Signed-off-by: Michał Górny <mgorny at gentoo.org>
---
libcxx/test/libcxx/atomics/clear_padding.pass.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
index 69d4a7f9b694a..8ef1364b4c9ed 100644
--- a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
+++ b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
@@ -24,6 +24,10 @@
// ADDITIONAL_COMPILE_FLAGS: -Wno-deprecated-volatile -Wno-dynamic-class-memaccess
+// This test crashes with -fstack-protector-strong
+// (see https://github.com/llvm/llvm-project/issues/212002)
+// ADDITIONAL_COMPILE_FLAGS: -fno-stack-protector
+
#include <atomic>
#include <cassert>
#include <cstring>
>From c9428f3ceb82f9e565adcf540f97b70cdcb9b4bc Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 9 Sep 2026 14:30:16 +0200
Subject: [PATCH 2/2] Use llvm.org
---
libcxx/test/libcxx/atomics/clear_padding.pass.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
index 8ef1364b4c9ed..6f7cc2ba1d371 100644
--- a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
+++ b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
@@ -25,7 +25,7 @@
// ADDITIONAL_COMPILE_FLAGS: -Wno-deprecated-volatile -Wno-dynamic-class-memaccess
// This test crashes with -fstack-protector-strong
-// (see https://github.com/llvm/llvm-project/issues/212002)
+// (see https://llvm.org/PR212002)
// ADDITIONAL_COMPILE_FLAGS: -fno-stack-protector
#include <atomic>
More information about the libcxx-commits
mailing list