Support: reduce stack used in default size test.
authorTim Northover <t.p.northover@gmail.com>
Tue, 13 Jul 2021 10:23:03 +0000 (11:23 +0100)
committerTim Northover <t.p.northover@gmail.com>
Tue, 13 Jul 2021 10:24:12 +0000 (11:24 +0100)
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.

llvm/unittests/Support/Threading.cpp

index 69a2987..87008f1 100644 (file)
@@ -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);
   });