summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-02-17 17:09:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-18 11:37:11 +0000
commit2dfaee820391dba7c649090bcf9b0b275c56c670 (patch)
treef8d76df0ab966c0bded1769081a217cd9d6fce9f /meta/recipes-sato
parentb7cb48c2b99677332409ed19256cd76474e7d7c7 (diff)
downloadpoky-2dfaee820391dba7c649090bcf9b0b275c56c670.tar.gz
webkitgtk: drop patch merged upstream
Portions of it were then further refactored upstream, leading to some bits of the patch dropped and some re-applied on a automated version upgrade. (From OE-Core rev: d9de00cd5228d42f628af455ad42c06a0883f6d0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch77
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.34.5.bb1
2 files changed, 0 insertions, 78 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
deleted file mode 100644
index d8d36fad6b..0000000000
--- a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From 358a8f053c367aab7fba8ab059244e0530c7ff82 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 17 Mar 2021 13:24:57 -0700
4Subject: [PATCH] reduce thread stack and heap usage for javascriptcore on musl
5
6default sizes for musl are smaller compared to glibc, this matches
7to musl defaults, avoid stack overflow crashes in jscore
8
9This is based on Alpine Linux's patch based on suggestion from
10https://bugs.webkit.org/show_bug.cgi?id=187485
11
12Real solution would entail more as the suggestions to increase
13stack size via -Wl,-z,stack-size=N does not work fully and also
14setting DEFAULT_THREAD_STACK_SIZE_IN_KB alone is not enough either
15
16This patch only changes behavior when using musl, the defaults for
17glibc in OE remains same
18
19Upstream-Status: Accepted
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21
22---
23 Source/JavaScriptCore/runtime/OptionsList.h | 18 +++++++++++++++---
24 Source/WTF/wtf/Threading.h | 4 ++++
25 2 files changed, 19 insertions(+), 3 deletions(-)
26
27diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h
28index a0c2170e..9e107af7 100644
29--- a/Source/JavaScriptCore/runtime/OptionsList.h
30+++ b/Source/JavaScriptCore/runtime/OptionsList.h
31@@ -77,6 +77,18 @@ bool canUseWebAssemblyFastMemory();
32 // On instantiation of the first VM instance, the Options will be write protected
33 // and cannot be modified thereafter.
34
35+#if OS(LINUX) && !defined(__GLIBC__)
36+// non-glibc options on linux ( musl )
37+constexpr unsigned jscMaxPerThreadStack = 128 * KB;
38+constexpr unsigned jscSoftReservedZoneSize = 32 * KB;
39+constexpr unsigned jscReservedZoneSize = 16 * KB;
40+#else
41+//default
42+constexpr unsigned jscMaxPerThreadStack = 4 * MB;
43+constexpr unsigned jscSoftReservedZoneSize = 128 * KB;
44+constexpr unsigned jscReservedZoneSize = 64 * KB;
45+#endif
46+
47 #define FOR_EACH_JSC_OPTION(v) \
48 v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \
49 v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \
50@@ -92,9 +104,9 @@ bool canUseWebAssemblyFastMemory();
51 \
52 v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
53 \
54- v(Unsigned, maxPerThreadStackUsage, 5 * MB, Normal, "Max allowed stack usage by the VM") \
55- v(Unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
56- v(Unsigned, reservedZoneSize, 64 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
57+ v(Unsigned, maxPerThreadStackUsage, jscMaxPerThreadStack, Normal, "Max allowed stack usage by the VM") \
58+ v(Unsigned, softReservedZoneSize, jscSoftReservedZoneSize, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
59+ v(Unsigned, reservedZoneSize, jscReservedZoneSize, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
60 \
61 v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \
62 v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
63diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h
64index 178f9808..95ec5a85 100644
65--- a/Source/WTF/wtf/Threading.h
66+++ b/Source/WTF/wtf/Threading.h
67@@ -67,6 +67,10 @@
68 #undef None
69 #endif
70
71+#if OS(LINUX) && !defined(__GLIBC__)
72+#define DEFAULT_THREAD_STACK_SIZE_IN_KB 128
73+#endif
74+
75 namespace WTF {
76
77 class AbstractLocker;
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.5.bb
index 227ac2bf72..e6362bedc3 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.34.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.5.bb
@@ -16,7 +16,6 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
16 file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \ 16 file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
17 file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \ 17 file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \
18 file://reduce-memory-overheads.patch \ 18 file://reduce-memory-overheads.patch \
19 file://musl-lower-stack-usage.patch \
20 file://0001-Fix-build-without-opengl-or-es.patch \ 19 file://0001-Fix-build-without-opengl-or-es.patch \
21 file://reproducibility.patch \ 20 file://reproducibility.patch \
22 " 21 "