diff options
Diffstat (limited to 'meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch')
-rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch | 24 |
1 files changed, 18 insertions, 6 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 index 5033de4196..e4b5818358 100644 --- a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch +++ b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch | |||
@@ -1,4 +1,7 @@ | |||
1 | reduce thread stack and heap usage for javascriptcore on musl | 1 | From 5c82d20a00749e9106db78cdd23a09609dd3511c Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 17 Mar 2021 13:24:57 -0700 | ||
4 | Subject: [PATCH] reduce thread stack and heap usage for javascriptcore on musl | ||
2 | 5 | ||
3 | default sizes for musl are smaller compared to glibc, this matches | 6 | default sizes for musl are smaller compared to glibc, this matches |
4 | to musl defaults, avoid stack overflow crashes in jscore | 7 | to musl defaults, avoid stack overflow crashes in jscore |
@@ -16,9 +19,16 @@ glibc in OE remains same | |||
16 | Upstream-Status: Accepted | 19 | Upstream-Status: Accepted |
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
18 | 21 | ||
22 | --- | ||
23 | Source/JavaScriptCore/runtime/OptionsList.h | 20 ++++++++++++++++---- | ||
24 | Source/WTF/wtf/Threading.h | 4 ++++ | ||
25 | 2 files changed, 20 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h | ||
28 | index bc1cedb9..a6209742 100644 | ||
19 | --- a/Source/JavaScriptCore/runtime/OptionsList.h | 29 | --- a/Source/JavaScriptCore/runtime/OptionsList.h |
20 | +++ b/Source/JavaScriptCore/runtime/OptionsList.h | 30 | +++ b/Source/JavaScriptCore/runtime/OptionsList.h |
21 | @@ -75,6 +75,18 @@ constexpr bool enableWebAssemblyStreamin | 31 | @@ -71,6 +71,18 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); |
22 | // On instantiation of the first VM instance, the Options will be write protected | 32 | // On instantiation of the first VM instance, the Options will be write protected |
23 | // and cannot be modified thereafter. | 33 | // and cannot be modified thereafter. |
24 | 34 | ||
@@ -37,7 +47,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
37 | #define FOR_EACH_JSC_OPTION(v) \ | 47 | #define FOR_EACH_JSC_OPTION(v) \ |
38 | v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \ | 48 | v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \ |
39 | v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \ | 49 | v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \ |
40 | @@ -90,9 +102,9 @@ constexpr bool enableWebAssemblyStreamin | 50 | @@ -86,9 +98,9 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); |
41 | \ | 51 | \ |
42 | v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \ | 52 | v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \ |
43 | \ | 53 | \ |
@@ -50,7 +60,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
50 | \ | 60 | \ |
51 | v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \ | 61 | v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \ |
52 | v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ | 62 | v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ |
53 | @@ -601,7 +613,7 @@ public: | 63 | @@ -608,7 +620,7 @@ public: |
54 | bool init(const char*); | 64 | bool init(const char*); |
55 | bool isInRange(unsigned); | 65 | bool isInRange(unsigned); |
56 | const char* rangeString() const { return (m_state > InitError) ? m_rangeString : s_nullRangeStr; } | 66 | const char* rangeString() const { return (m_state > InitError) ? m_rangeString : s_nullRangeStr; } |
@@ -59,10 +69,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
59 | void dump(PrintStream& out) const; | 69 | void dump(PrintStream& out) const; |
60 | 70 | ||
61 | private: | 71 | private: |
72 | diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h | ||
73 | index 9495d6c1..190b3811 100644 | ||
62 | --- a/Source/WTF/wtf/Threading.h | 74 | --- a/Source/WTF/wtf/Threading.h |
63 | +++ b/Source/WTF/wtf/Threading.h | 75 | +++ b/Source/WTF/wtf/Threading.h |
64 | @@ -56,6 +56,10 @@ | 76 | @@ -60,6 +60,10 @@ |
65 | #include <array> | 77 | #include <dispatch/dispatch.h> |
66 | #endif | 78 | #endif |
67 | 79 | ||
68 | +#if OS(LINUX) && !defined(__GLIBC__) | 80 | +#if OS(LINUX) && !defined(__GLIBC__) |