diff options
author | Marc Vertes <marc.vertes@ugrid.net> | 2016-02-24 10:03:40 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-02-24 11:51:14 +0000 |
commit | 2191d52882a51f7365b4a676305020215d3b0226 (patch) | |
tree | 2000f7440cdb102ed2f67f3640cef1c682f1c688 /testing/mongodb/musl-available-stack.patch | |
parent | a148c910b9b3d31765e4d315b0db4f5195ffeb82 (diff) | |
download | aports-2191d52882a51f7365b4a676305020215d3b0226.tar.bz2 aports-2191d52882a51f7365b4a676305020215d3b0226.tar.xz |
testing/mongodb: Fix mongo shell "too much recursion" #5117
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.
Diffstat (limited to 'testing/mongodb/musl-available-stack.patch')
-rw-r--r-- | testing/mongodb/musl-available-stack.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/mongodb/musl-available-stack.patch b/testing/mongodb/musl-available-stack.patch new file mode 100644 index 0000000000..4774b6210a --- /dev/null +++ b/testing/mongodb/musl-available-stack.patch @@ -0,0 +1,17 @@ +--- 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 |