[llvm] 85cb4f9 - Support: reduce stack used in default size test.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 03:24:18 PDT 2021


Author: Tim Northover
Date: 2021-07-13T11:24:12+01:00
New Revision: 85cb4f9904e9b080302e0c0874e3b441fe7062a7

URL: https://github.com/llvm/llvm-project/commit/85cb4f9904e9b080302e0c0874e3b441fe7062a7
DIFF: https://github.com/llvm/llvm-project/commit/85cb4f9904e9b080302e0c0874e3b441fe7062a7.diff

LOG: 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.

Added: 
    

Modified: 
    llvm/unittests/Support/Threading.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/Threading.cpp b/llvm/unittests/Support/Threading.cpp
index 69a29872b18ed..87008f17feb67 100644
--- a/llvm/unittests/Support/Threading.cpp
+++ b/llvm/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);
   });


        


More information about the llvm-commits mailing list