-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEMORY64: GLFW drop function passes incorrect filename values #23505
Comments
This works in Chrome, so it is likely a Firefox issue. Perhaps Firefox 134 has not updated to the final spec? You may want to check a Firefox nightly build. |
We have an interactive test called |
I've just checked it on Chromium version 133.0.6943.98 and got the same results (TypeError, then RuntimeError). |
Verified by running interactive64.test_glfw_dropfile locally. Fixes: emscripten-core#23505
Verified by running interactive64.test_glfw_dropfile locally. Fixes: emscripten-core#23505
Fix is in #23676 |
The
onDrop
function in libglfw.js has two different issues in the wasm64 version:filenames
parameter to number, while on wasm64 it is BigInt.filenames
array allocates 4 bytes per element, while on wasm64 it is 8.Example output for 5 input files (running on Firefox 134):
After applying a manual fix for the first issue:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.0 (97c7c2a)
clang version 20.0.0git (https:/github.com/llvm/llvm-project 322eb1a92e6d4266184060346616fa0dbe39e731)
Target: wasm32-unknown-emscripten
Thread model: posix
Failing command line in full:
emcc -s ENVIRONMENT=web -s USE_GLFW=3 -s MEMORY64=1 main.cpp -o main.html
main.cpp:
The text was updated successfully, but these errors were encountered: