From d0ed7113e4c6053bf910e10cde335c19285148be Mon Sep 17 00:00:00 2001 From: Kassy <78169097+Kassy2048@users.noreply.github.com> Date: Mon, 4 Nov 2024 02:16:44 +0100 Subject: [PATCH 1/3] Increase the stack size to 128 KB It is 64 KB by default, but aom needs at least 64800 bytes for decoding frames (see the arrays allocated in "av1/common/restoration.c" with size RESTORATION_PROC_UNIT_PELS). We already allocate at least 200 MB for the memory, so using 128 KB for the stack sounds reasonable (it is 1 MB by default on some x86 OS for instance). Fix renpy/renpy#5871 --- tasks/renpython.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/renpython.py b/tasks/renpython.py index e5a2058e..25e8cdd5 100644 --- a/tasks/renpython.py +++ b/tasks/renpython.py @@ -612,6 +612,7 @@ def link_web(c: Context): -sASYNCIFY_ONLY="{{ asyncify_only }}" -sINITIAL_MEMORY=192MB -sALLOW_MEMORY_GROWTH=1 + -sSTACK_SIZE=128KB -sEXPORTED_FUNCTIONS=['_main'] From 2581464a7bea598e70125199fd66f9c66e6bcea8 Mon Sep 17 00:00:00 2001 From: Tom Rothamel Date: Tue, 5 Nov 2024 00:56:44 -0500 Subject: [PATCH 2/3] Bump the stack up to 1MB. Since we only have the one thread. Per discussion in #143. --- tasks/renpython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/renpython.py b/tasks/renpython.py index 25e8cdd5..79ea7a00 100644 --- a/tasks/renpython.py +++ b/tasks/renpython.py @@ -612,7 +612,7 @@ def link_web(c: Context): -sASYNCIFY_ONLY="{{ asyncify_only }}" -sINITIAL_MEMORY=192MB -sALLOW_MEMORY_GROWTH=1 - -sSTACK_SIZE=128KB + -sSTACK_SIZE=1024KB -sEXPORTED_FUNCTIONS=['_main'] From cf70c70019129ad440e8fd9184903c7b914167ef Mon Sep 17 00:00:00 2001 From: Tom Rothamel Date: Tue, 5 Nov 2024 22:19:13 -0500 Subject: [PATCH 3/3] Fix stack size setting for older versions of emscripten. --- tasks/renpython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/renpython.py b/tasks/renpython.py index 79ea7a00..97116c63 100644 --- a/tasks/renpython.py +++ b/tasks/renpython.py @@ -612,7 +612,7 @@ def link_web(c: Context): -sASYNCIFY_ONLY="{{ asyncify_only }}" -sINITIAL_MEMORY=192MB -sALLOW_MEMORY_GROWTH=1 - -sSTACK_SIZE=1024KB + -sTOTAL_STACK=1048576 -sEXPORTED_FUNCTIONS=['_main']