AHuguet commited on
Commit
57c0e54
·
unverified ·
1 Parent(s): 6091193

examples : fix WASM Stack Overflow (#1713)

Browse files

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.

Files changed (1) hide show
  1. CMakeLists.txt +2 -2
CMakeLists.txt CHANGED
@@ -344,8 +344,8 @@ else()
344
  endif()
345
  else()
346
  if (EMSCRIPTEN)
347
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
348
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
349
  else()
350
  if(NOT WHISPER_NO_AVX)
351
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
 
344
  endif()
345
  else()
346
  if (EMSCRIPTEN)
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")
349
  else()
350
  if(NOT WHISPER_NO_AVX)
351
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")