mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 09:32:17 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b7cb48c2b9
commit
2dfaee8203
@@ -1,77 +0,0 @@
|
||||
From 358a8f053c367aab7fba8ab059244e0530c7ff82 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 17 Mar 2021 13:24:57 -0700
|
||||
Subject: [PATCH] reduce thread stack and heap usage for javascriptcore on musl
|
||||
|
||||
default sizes for musl are smaller compared to glibc, this matches
|
||||
to musl defaults, avoid stack overflow crashes in jscore
|
||||
|
||||
This is based on Alpine Linux's patch based on suggestion from
|
||||
https://bugs.webkit.org/show_bug.cgi?id=187485
|
||||
|
||||
Real solution would entail more as the suggestions to increase
|
||||
stack size via -Wl,-z,stack-size=N does not work fully and also
|
||||
setting DEFAULT_THREAD_STACK_SIZE_IN_KB alone is not enough either
|
||||
|
||||
This patch only changes behavior when using musl, the defaults for
|
||||
glibc in OE remains same
|
||||
|
||||
Upstream-Status: Accepted
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
Source/JavaScriptCore/runtime/OptionsList.h | 18 +++++++++++++++---
|
||||
Source/WTF/wtf/Threading.h | 4 ++++
|
||||
2 files changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h
|
||||
index a0c2170e..9e107af7 100644
|
||||
--- a/Source/JavaScriptCore/runtime/OptionsList.h
|
||||
+++ b/Source/JavaScriptCore/runtime/OptionsList.h
|
||||
@@ -77,6 +77,18 @@ bool canUseWebAssemblyFastMemory();
|
||||
// On instantiation of the first VM instance, the Options will be write protected
|
||||
// and cannot be modified thereafter.
|
||||
|
||||
+#if OS(LINUX) && !defined(__GLIBC__)
|
||||
+// non-glibc options on linux ( musl )
|
||||
+constexpr unsigned jscMaxPerThreadStack = 128 * KB;
|
||||
+constexpr unsigned jscSoftReservedZoneSize = 32 * KB;
|
||||
+constexpr unsigned jscReservedZoneSize = 16 * KB;
|
||||
+#else
|
||||
+//default
|
||||
+constexpr unsigned jscMaxPerThreadStack = 4 * MB;
|
||||
+constexpr unsigned jscSoftReservedZoneSize = 128 * KB;
|
||||
+constexpr unsigned jscReservedZoneSize = 64 * KB;
|
||||
+#endif
|
||||
+
|
||||
#define FOR_EACH_JSC_OPTION(v) \
|
||||
v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \
|
||||
v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \
|
||||
@@ -92,9 +104,9 @@ bool canUseWebAssemblyFastMemory();
|
||||
\
|
||||
v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
|
||||
\
|
||||
- v(Unsigned, maxPerThreadStackUsage, 5 * MB, Normal, "Max allowed stack usage by the VM") \
|
||||
- v(Unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
|
||||
- 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).") \
|
||||
+ v(Unsigned, maxPerThreadStackUsage, jscMaxPerThreadStack, Normal, "Max allowed stack usage by the VM") \
|
||||
+ v(Unsigned, softReservedZoneSize, jscSoftReservedZoneSize, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
|
||||
+ 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).") \
|
||||
\
|
||||
v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \
|
||||
v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
|
||||
diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h
|
||||
index 178f9808..95ec5a85 100644
|
||||
--- a/Source/WTF/wtf/Threading.h
|
||||
+++ b/Source/WTF/wtf/Threading.h
|
||||
@@ -67,6 +67,10 @@
|
||||
#undef None
|
||||
#endif
|
||||
|
||||
+#if OS(LINUX) && !defined(__GLIBC__)
|
||||
+#define DEFAULT_THREAD_STACK_SIZE_IN_KB 128
|
||||
+#endif
|
||||
+
|
||||
namespace WTF {
|
||||
|
||||
class AbstractLocker;
|
||||
@@ -16,7 +16,6 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
|
||||
file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
|
||||
file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \
|
||||
file://reduce-memory-overheads.patch \
|
||||
file://musl-lower-stack-usage.patch \
|
||||
file://0001-Fix-build-without-opengl-or-es.patch \
|
||||
file://reproducibility.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user