You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.73 (ac676d5)
Issue
When trying to allocate maximal initial memory, there is an error: em++: error: MAXIMUM_MEMORY cannot be less than INITIAL_MEMORY
As I've inspected the code behind, it's due to the fact that INITIAL_MEMORY can be incremented withing the link.py -> inc_initial_memory which is quite a big increment in case of -phtread and -fsanitize=address, which is my case.
Can we make this more user friendly? Maybe some kind of check that it's capped to MAXIMUM_MEMORY.
Failing command line in full:
// cat main.cppintmain() {
return0;
}
em++ main.cpp -o main.html -stdlib=libc++ -fsanitize=address -pthread -sSHARED_MEMORY=1 -sINITIAL_MEMORY=4288413696 -sMAXIMUM_MEMORY=4294967296 -sALLOW_MEMORY_GROWTH=1
em++: warning: -pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271 [-Wpthreads-mem-growth]
(print from link.py) INITIAL_MEMORY 4902027264
(print from link.py) MAXIMUM_MEMORY 4294967296
em++: error: MAXIMUM_MEMORY cannot be less than INITIAL_MEMORY
The text was updated successfully, but these errors were encountered:
Yes, its certainly looks like we got at least give a better error here. ASAN requires a lot of extra memory but that way we calculate this and inject it into the exiting memory is pretty delicate/hairy.
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.73 (ac676d5)
Issue
When trying to allocate maximal initial memory, there is an error:
em++: error: MAXIMUM_MEMORY cannot be less than INITIAL_MEMORY
As I've inspected the code behind, it's due to the fact that INITIAL_MEMORY can be incremented withing the
link.py -> inc_initial_memory
which is quite a big increment in case of-phtread
and-fsanitize=address
, which is my case.Can we make this more user friendly? Maybe some kind of check that it's capped to MAXIMUM_MEMORY.
Failing command line in full:
The text was updated successfully, but these errors were encountered: