mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 04:35:39 +03:00
The problem is due to the fact that spidermonkey expects a larger available space on the thread stack than the one allocated by default by Musl libc. In the code which checks the available stack space, we adjust the reserved quota to 32k instead of 64k because the default musl libc thread stack size is small (80k) and we can not set stack size for C++ threads. Note also that with musl, stack size does not include guard page.
17 lines
878 B
Diff
17 lines
878 B
Diff
--- mongodb-src-r3.2.1/src/mongo/scripting/mozjs/implscope.cpp.orig
|
|
+++ mongodb-src-r3.2.1/src/mongo/scripting/mozjs/implscope.cpp
|
|
@@ -258,7 +258,13 @@
|
|
//
|
|
// TODO: What if we are running on a platform with very
|
|
// large pages, like 4MB?
|
|
- JS_SetNativeStackQuota(_runtime, available.get() - (64 * 1024));
|
|
+ //JS_SetNativeStackQuota(_runtime, available.get() - (64 * 1024));
|
|
+
|
|
+ // For musl libc: We adjust the reserved quota to 32k instead of
|
|
+ // 64k because the default musl libc thread stack size is small
|
|
+ // (80k) and we can not set stack size for C++ threads.
|
|
+ // Note also that with musl, stack size does not include guard page.
|
|
+ JS_SetNativeStackQuota(_runtime, available.get() - (32 * 1024));
|
|
}
|
|
|
|
// The memory limit is in megabytes
|