[compiler-rt] [ASan] Make multiple_sigaltstack.cpp test use MINSIGSTKSZ (PR #197204)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 07:18:36 PDT 2026


https://github.com/DanBlackwell created https://github.com/llvm/llvm-project/pull/197204

Currently this test is failing on Darwin due to the specified stack size being below the minimum (as defined by MINSIGSTKSZ).

This patch allocates a buffer with size MINSIGSTKSZ in order to overcome this.

rdar://176838125

>From 08509a4dc99cdeb1d962dd56c4112ae55dc64a0b Mon Sep 17 00:00:00 2001
From: Dan Blackwell <dan_blackwell at apple.com>
Date: Tue, 12 May 2026 15:15:00 +0100
Subject: [PATCH] [ASan] Make multiple_sigaltstack.cpp test use MINSIGSTKSZ

Currently this test is failing on Darwin due to the specified stack size being below the minimum (as defined by MINSIGSTKSZ).

This patch allocates a buffer with size MINSIGSTKSZ in order to overcome this.

rdar://176838125
---
 compiler-rt/test/asan/TestCases/Posix/multiple_sigaltstack.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/asan/TestCases/Posix/multiple_sigaltstack.cpp b/compiler-rt/test/asan/TestCases/Posix/multiple_sigaltstack.cpp
index a7cf4b3a43b91..608a778f7140a 100644
--- a/compiler-rt/test/asan/TestCases/Posix/multiple_sigaltstack.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/multiple_sigaltstack.cpp
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-char global_alt_stack[4096 * 4];
+char global_alt_stack[MINSIGSTKSZ];
 
 int main() {
   stack_t altstack;



More information about the llvm-commits mailing list