summaryrefslogtreecommitdiff
path: root/repo/qt5-qtwebengine/default-pthread-stacksize.patch
blob: e0ca792288b98967ec0d189d4e5396cedf85ca1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- ./src/3rdparty/chromium/base/threading/platform_thread_linux.cc
+++ ./src/3rdparty/chromium/base/threading/platform_thread_linux.cc
@@ -186,7 +186,8 @@
 
 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
 #if !defined(THREAD_SANITIZER)
-  return 0;
+  // use 2mb to avoid running out of space. This is what android uses
+  return 2 * (1 << 20);
 #else
   // ThreadSanitizer bloats the stack heavily. Evidence has been that the
   // default stack size isn't enough for some browser tests.
--- ./src/3rdparty/chromium/base/threading/platform_thread_unittest.cc.orig
+++ ./src/3rdparty/chromium/base/threading/platform_thread_unittest.cc
@@ -411,7 +411,7 @@
     ((defined(OS_LINUX) || defined(OS_CHROMEOS)) &&              \
      !defined(THREAD_SANITIZER)) ||                              \
     (defined(OS_ANDROID) && !defined(ADDRESS_SANITIZER))
-  EXPECT_EQ(0u, stack_size);
+  EXPECT_EQ(2u << 20, stack_size);
 #else
   EXPECT_GT(stack_size, 0u);
   EXPECT_LT(stack_size, 20u * (1 << 20));