summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-13 00:41:52 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-07-14 23:56:51 +0200
commitd69be5de8c15bfe015c8a6ffb15eee3afb43b841 (patch)
tree225ef848492aa1aa1817d7702215ff413076abb1 /recipes-qt/qt5/qtwebengine/0012-Adjust-default-pthread-stack-size.patch
parent92c634e9d584ebbf508b5ca4fea6d61d38373513 (diff)
downloadmeta-qt5-d69be5de8c15bfe015c8a6ffb15eee3afb43b841.tar.gz
qtwebengine: Fix build on musl
import needed chromium patches from meta-browser Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
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.patch51
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 @@
1From 65d516f64c1cca91868cb26aeb93802382704fd5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jul 2017 16:41:23 -0700
4Subject: [PATCH 1/2] Adjust default pthread stack size
5
6Signed-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
13diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc
14index 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.
27diff --git a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
28index 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--
502.13.2
51