From 17974afd26e95a9dc8cb7b6f20657f6db19498ea Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Tue, 13 Jul 2021 11:23:03 +0100 Subject: [PATCH] Support: reduce stack used in default size test. When the sanitizers aren't enabled they can use more than 1KB of stack, causing an overflow where there shouldn't be. Should fix Green Dragon test. --- unittests/Support/Threading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/Support/Threading.cpp b/unittests/Support/Threading.cpp index 69a29872b18..87008f17feb 100644 --- a/unittests/Support/Threading.cpp +++ b/unittests/Support/Threading.cpp @@ -82,7 +82,7 @@ TEST(Threading, RunOnThreadSync) { #if defined(__APPLE__) TEST(Threading, AppleStackSize) { llvm::thread Thread([] { - volatile unsigned char Var[8 * 1024 * 1024 - 1024]; + volatile unsigned char Var[8 * 1024 * 1024 - 10240]; Var[0] = 0xff; ASSERT_EQ(Var[0], 0xff); });