[libcxx-commits] [libcxx] [libc++] Disable SSP in `clear_padding.pass.cpp` (PR #218130)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 22 06:48:43 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Michał Górny (mgorny)

<details>
<summary>Changes</summary>

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 

---
Full diff: https://github.com/llvm/llvm-project/pull/218130.diff


1 Files Affected:

- (modified) libcxx/test/libcxx/atomics/clear_padding.pass.cpp (+3-1) 


``````````diff
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>

``````````

</details>


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


More information about the libcxx-commits mailing list