[libcxx-commits] [libcxx] [libc++] Disable SSP in `clear_padding.pass.cpp` (PR #218130)
Michał Górny via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 22 06:48:05 PDT 2026
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/218130
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 #212002
Fixes a test regression introduced in #76180
CC @huixie90
>From 752d859a9cdd72c555d6fca908f94c5a234585f9 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] [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, 3 insertions(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
index 69d4a7f9b694a..5b4e84a9b1ac9 100644
--- a/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
+++ b/libcxx/test/libcxx/atomics/clear_padding.pass.cpp
@@ -22,7 +22,9 @@
// XFAIL: clang-23 && asan
// UNSUPPORTED: clang-24 && asan
-// 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: -Wno-deprecated-volatile -Wno-dynamic-class-memaccess -fno-stack-protector
#include <atomic>
#include <cassert>
More information about the libcxx-commits
mailing list