Skip to content

Commit f39f969

Browse files
authored
examples : fix WASM Stack Overflow (#1713)
Fix for problem: """ RuntimeError: Aborted(Stack overflow! Stack cookie has been overwritten at 0x12be2b10, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x00000000 0x00000000) """ That appears when executing the WASM example with the newer versions.
1 parent f9ca902 commit f39f969

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ else()
344344
endif()
345345
else()
346346
if (EMSCRIPTEN)
347-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
348-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
347+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -s TOTAL_STACK=5242880")
348+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -s TOTAL_STACK=5242880")
349349
else()
350350
if(NOT WHISPER_NO_AVX)
351351
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")

0 commit comments

Comments
 (0)