-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
This is likely a Safari bug, but because it only triggers when using certain arguments to Emscripten I am cross posting here. Basically under certain circumstances, when WASM performs an unaligned load, and Asyncify is enabled, and you are using Safari, it triggers a continuous memory leak even after all WASM threads have completed eventually causing an out-of-memory crash. There are a few libraries I have encountered that trigger this, but GLSlang is one I was able to quickly fix and verify it appears to stops the leak.
Repro: https://github.com/jamesdolan/safari_leak
Adding the problematic function(s) to ASYNCIFY_REMOVE also avoids the issue FWIW.
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.22 (0f3d2e62bccf8e14497ff19e05a1202c51eb0c65)
clang version 22.0.0git (https:/github.com/llvm/llvm-project c7706d9472fe880ba1d3418919ad4185710c9559)
Target: wasm32-unknown-emscripten
Thread model: posix
Metadata
Metadata
Assignees
Labels
No labels