File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,12 @@ TEST(LlvmLibcStackChkFail, Death) {
1818 EXPECT_DEATH ([] { __stack_chk_fail (); }, WITH_SIGNAL (SIGABRT));
1919}
2020
21- // When https://github.com/llvm/llvm-project/issues/125760 is fixed,
22- // this can use the `gnu::` spelling unconditionally.
23- #ifdef __clang__
24- #define SANITIZER_ATTR_NS clang
25- #else
26- #define SANITIZER_ATTR_NS gnu
27- #endif
28-
2921// Disable sanitizers such as asan and hwasan that would catch the buffer
3022// overrun before it clobbered the stack canary word. Function attributes
31- // can't be applied to lambdas before C++23, so this has to be separate.
32- [[SANITIZER_ATTR_NS::no_sanitize(" all" )]] void smash_stack () {
23+ // can't be applied to lambdas before C++23, so this has to be separate. When
24+ // https://github.com/llvm/llvm-project/issues/125760 is fixed, this can use
25+ // the modern spelling [[gnu::no_sanitize(...)]] without conditionalization.
26+ __attribute__ ((no_sanitize(" all" ))) void smash_stack () {
3327 int arr[20 ];
3428 LIBC_NAMESPACE::memset (arr, 0xAA , 2001 );
3529}
You can’t perform that action at this time.
0 commit comments