Skip to content

Commit

Permalink
emscripten: Increase stack size to 128 kB.
Browse files Browse the repository at this point in the history
Emscripten's stack size was recently decreased to 64 kB from 5 MB,
(emscripten-core/emscripten#18191).

Stack overflow appears to be the cause of frequent crashes of Tracy
in my browser, especially at start-up. This increase is modest, but
seems to be enough to resolve the issue.
  • Loading branch information
topolarity committed Jan 18, 2023
1 parent e4bd88c commit f805e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion profiler/build/wasm/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CFLAGS += -sUSE_FREETYPE=1 -pthread
CXXFLAGS := $(CFLAGS) -std=c++17
DEFINES += -DIMGUI_ENABLE_FREETYPE -DIMGUI_IMPL_OPENGL_ES2
INCLUDES := -I../../../imgui -I$(HOME)/.emscripten_cache/sysroot/include/capstone
LIBS += -lpthread -ldl $(HOME)/.emscripten_cache/sysroot/lib/libcapstone.a -sUSE_GLFW=3 -sINITIAL_MEMORY=384mb -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=4gb -sWASM_BIGINT=1 -sPTHREAD_POOL_SIZE=4 -sEXPORTED_FUNCTIONS=_main,_nativeResize,_nativeOpenFile -sEXPORTED_RUNTIME_METHODS=ccall -sENVIRONMENT=web,worker --preload-file embed.tracy
LIBS += -lpthread -ldl $(HOME)/.emscripten_cache/sysroot/lib/libcapstone.a -sUSE_GLFW=3 -sINITIAL_MEMORY=384mb -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=4gb -sWASM_BIGINT=1 -sPTHREAD_POOL_SIZE=4 -sEXPORTED_FUNCTIONS=_main,_nativeResize,_nativeOpenFile -sEXPORTED_RUNTIME_METHODS=ccall -sENVIRONMENT=web,worker -sSTACK_SIZE=131072 -sDEFAULT_PTHREAD_STACK_SIZE=131072 --preload-file embed.tracy

PROJECT := Tracy
IMAGE := $(PROJECT)-$(BUILD).html
Expand Down

0 comments on commit f805e77

Please sign in to comment.