Log Message
Merge r275670 - [WPE] Build fixes for musl C library on Linux https://bugs.webkit.org/show_bug.cgi?id=210068
Patch by Khem Raj <[email protected]> on 2021-04-08 Reviewed by Carlos Alberto Lopez Perez. Source/_javascript_Core: Use OS(LINUX) to include musl in platform test for linux and consolidate all linux platfrom under same test. Use smaller limits for JSC stack size per thread and reserved zone size. * runtime/MachineContext.h: (JSC::MachineContext::stackPointerImpl): (JSC::MachineContext::framePointerImpl): (JSC::MachineContext::instructionPointerImpl): (JSC::MachineContext::argumentPointer<1>): (JSC::MachineContext::llintInstructionPointer): * runtime/OptionsList.h: Source/WTF: Define 128KB DEFAULT_THREAD_STACK_SIZE_IN_KB for musl Use OS(LINUX) check to include musl when building for Linux based platforms. * wtf/PlatformHave.h: * wtf/Threading.cpp:
Modified Paths
- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog
- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/MachineContext.h
- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/OptionsList.h
- releases/WebKitGTK/webkit-2.32/Source/WTF/ChangeLog
- releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/PlatformHave.h
- releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/Threading.cpp
Diff
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog 2021-04-29 14:14:44 UTC (rev 276769)
@@ -1,3 +1,23 @@
+2021-04-08 Khem Raj <[email protected]>
+
+ [WPE] Build fixes for musl C library on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=210068
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ Use OS(LINUX) to include musl in platform test
+ for linux and consolidate all linux platfrom
+ under same test. Use smaller limits for JSC
+ stack size per thread and reserved zone size.
+
+ * runtime/MachineContext.h:
+ (JSC::MachineContext::stackPointerImpl):
+ (JSC::MachineContext::framePointerImpl):
+ (JSC::MachineContext::instructionPointerImpl):
+ (JSC::MachineContext::argumentPointer<1>):
+ (JSC::MachineContext::llintInstructionPointer):
+ * runtime/OptionsList.h:
+
2021-04-13 Ross Kirsling <[email protected]>
Move cloneUBreakIterator declaration to IntlWorkaround.h
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/MachineContext.h (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/MachineContext.h 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/MachineContext.h 2021-04-29 14:14:44 UTC (rev 276769)
@@ -196,7 +196,7 @@
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || OS(LINUX)
#if CPU(X86)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]);
@@ -347,7 +347,7 @@
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || OS(LINUX)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -498,7 +498,7 @@
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || OS(LINUX)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -656,7 +656,7 @@
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || OS(LINUX)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -773,7 +773,7 @@
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || OS(LINUX)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/OptionsList.h (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/OptionsList.h 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/OptionsList.h 2021-04-29 14:14:44 UTC (rev 276769)
@@ -71,6 +71,18 @@
// On instantiation of the first VM instance, the Options will be write protected
// and cannot be modified thereafter.
+#if OS(LINUX) && !defined(__BIONIC__) && !defined(__GLIBC__)
+// non-glibc/non-android options on linux ( musl )
+constexpr unsigned jscMaxPerThreadStack = 128 * KB;
+constexpr unsigned jscSoftReservedZoneSize = 32 * KB;
+constexpr unsigned jscReservedZoneSize = 16 * KB;
+#else
+// default
+constexpr unsigned jscMaxPerThreadStack = 5 * 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") \
@@ -86,9 +98,9 @@
\
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) \
@@ -608,7 +620,7 @@
bool init(const char*);
bool isInRange(unsigned);
const char* rangeString() const { return (m_state > InitError) ? m_rangeString : s_nullRangeStr; }
-
+
void dump(PrintStream& out) const;
private:
Modified: releases/WebKitGTK/webkit-2.32/Source/WTF/ChangeLog (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/WTF/ChangeLog 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/WTF/ChangeLog 2021-04-29 14:14:44 UTC (rev 276769)
@@ -1,3 +1,17 @@
+2021-04-08 Khem Raj <[email protected]>
+
+ [WPE] Build fixes for musl C library on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=210068
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ Define 128KB DEFAULT_THREAD_STACK_SIZE_IN_KB for musl
+ Use OS(LINUX) check to include musl when building for
+ Linux based platforms.
+
+ * wtf/PlatformHave.h:
+ * wtf/Threading.cpp:
+
2021-03-16 Carlos Garcia Campos <[email protected]>
[GTK][WPE] Stop using g_memdup
Modified: releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/PlatformHave.h (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/PlatformHave.h 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/PlatformHave.h 2021-04-29 14:14:44 UTC (rev 276769)
@@ -206,7 +206,7 @@
#define HAVE_HOSTED_CORE_ANIMATION 1
#endif
-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
+#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
#define HAVE_MACHINE_CONTEXT 1
#endif
Modified: releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/Threading.cpp (276768 => 276769)
--- releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/Threading.cpp 2021-04-29 13:43:34 UTC (rev 276768)
+++ releases/WebKitGTK/webkit-2.32/Source/WTF/wtf/Threading.cpp 2021-04-29 14:14:44 UTC (rev 276769)
@@ -52,6 +52,8 @@
#elif OS(DARWIN) && ASAN_ENABLED
if (threadType == ThreadType::Compiler)
return 1 * MB; // ASan needs more stack space (especially on Debug builds).
+#elif OS(LINUX) && !defined(__BIONIC__) && !defined(__GLIBC__) // MUSL default thread stack size.
+ return 128 * KB;
#else
UNUSED_PARAM(threadType);
#endif
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
