diff options
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..de2ec97d --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 65d516f64c1cca91868cb26aeb93802382704fd5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 16:41:23 -0700 | ||
4 | Subject: [PATCH 1/2] Adjust default pthread stack size | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | base/threading/platform_thread_linux.cc | 3 ++- | ||
9 | chrome/browser/chrome_browser_main_posix.cc | 9 +++++++++ | ||
10 | third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp | 4 ++-- | ||
11 | 3 files changed, 13 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc | ||
14 | index 95ed32418..666e85ba3 100644 | ||
15 | --- a/base/threading/platform_thread_linux.cc | ||
16 | +++ b/base/threading/platform_thread_linux.cc | ||
17 | @@ -96,7 +96,8 @@ void TerminateOnThread() {} | ||
18 | |||
19 | size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { | ||
20 | #if !defined(THREAD_SANITIZER) | ||
21 | - return 0; | ||
22 | + // use 8mb like glibc to avoid running out of space | ||
23 | + return (1 << 23); | ||
24 | #else | ||
25 | // ThreadSanitizer bloats the stack heavily. Evidence has been that the | ||
26 | // default stack size isn't enough for some browser tests. | ||
27 | diff --git a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp | ||
28 | index 3c0a0395b..2af6073e2 100644 | ||
29 | --- a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp | ||
30 | +++ b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp | ||
31 | @@ -73,7 +73,7 @@ size_t StackFrameDepth::getUnderestimatedStackSize() | ||
32 | // FIXME: On Mac OSX and Linux, this method cannot estimate stack size | ||
33 | // correctly for the main thread. | ||
34 | |||
35 | -#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) | ||
36 | +#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) | ||
37 | // pthread_getattr_np() can fail if the thread is not invoked by | ||
38 | // pthread_create() (e.g., the main thread of webkit_unit_tests). | ||
39 | // If so, a conservative size estimate is returned. | ||
40 | @@ -135,7 +135,7 @@ size_t StackFrameDepth::getUnderestimatedStackSize() | ||
41 | |||
42 | void* StackFrameDepth::getStackStart() | ||
43 | { | ||
44 | -#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) | ||
45 | +#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) | ||
46 | pthread_attr_t attr; | ||
47 | int error; | ||
48 | #if OS(FREEBSD) | ||
49 | -- | ||
50 | 2.13.2 | ||
51 | |||