[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
Wed Sep 9 05:22:25 PDT 2026
https://github.com/mgorny 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] [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>
More information about the libcxx-commits
mailing list