-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix wasm table access when accessing functions in splitted module #25432
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
Conversation
We can use the `toIndexType` utility function to access the wasm table
Changes from comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this means we don't have any test coverage for wasm64 + module splitting?
Can you try adding @also_with_wasm64
to test_split_module
? Can you confirm it doesn't work without this fix?
Otherwise lgtm!
This seems to be the case. |
lgtm with the test update |
Can you update the test ? |
Sure, do you mean increasing the coverage of the |
While working on split_module + mem64 in my application, I notice more changes required on top of this PR. I'm working on resolving those issues as well |
Yes, I was hoping you can add |
@sbc100 Do you have suggestions on how I can tweak test_split_module.post.js such that it'll work for both wasm32 and wasm64.
Could I perhaps create another file? i.e. |
You can use the |
Actually maybe |
This should have been part of emscripten-core#25432 but I guess I landed it too eagerly.
This should have been part of emscripten-core#25432 but I guess I landed it too eagerly.
This should have been part of #25432 but it seems we had a gap in our wasm64 testing because the `other` test suite is run with the standard emsdk version of node (v18) which does not support wasm64.
I've tried this actually, but the macro block does not expanded in the final output. Does this file go through the JS preprocessor? |
Update: I noticed that you have made a commit to handle this. One more thing, I looked at the CI logs and it seems like we are not running wasm64 tests |
Yup, see #25531, which also includes a fix to run the wasm64 other tests |
When accessing functions from the splitted module, there's an error because the wasmtable is using table64. So we would have to access it with a BigInt. This has been updated in other part of the codebase, but we missed this file.