- Notifications
You must be signed in to change notification settings - Fork3.5k
Implement a FNV1-a style checksum to the binary decoded Wasm data in debug builds#25910
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
sbc100 commentedDec 8, 2025
Are we sure this usefull though? In particular it would not have helped with#25906 would it? Adding more magic |
juj commentedDec 9, 2025
It would help, but that issue has additional complexity to the problem that the developer is not able to reproduce, but it is only an end user that is experiencing the problem. In that issue, the developer was claiming that the issue would be a problem with binary encoding, so after this PR, If the developer were able to reproduce the issue locally, then they could make an ASSERTIONS-enabled build to have this PR prove that there is nothing wrong with binary encoding. They could entertain the possibility of shipping an ASSERTIONS-enabled build to the customer however. This PR would also help this complaint:https://groups.google.com/g/emscripten-discuss/c/E_HmYqXGjN8 , where the developer reported a bug about binary encoding, but the root issue was that they were missing proper UTF-8 encoding on the file. With this PR, Emscripten would have directly stated so, and the developer would not have needed to raise an emscripten-discuss thread in the first place. |
sbc100 left a comment
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.
Ok sounds good!
lgtm % comment
Uh oh!
There was an error while loading.Please reload this page.
…d display a help notice about needing to serve the HTML/JS file with UTF-8 encoding. This helps developers identify if their own shell files might not have the necessary encoding.
This is an automatic change generated by tools/maint/rebaseline_tests.py.The following (4) test expectation files were updated byrunning the tests with `--rebaseline`:```codesize/test_codesize_hello_O0.json: 39332 => 39358 [+26 bytes / +0.07%]test/codesize/test_codesize_minimal_O0.expected.js updatedcodesize/test_codesize_minimal_O0.json: 20603 => 20629 [+26 bytes / +0.13%]codesize/test_unoptimized_code_size.json: 180926 => 180997 [+71 bytes / +0.04%]Average change: +0.08% (+0.04% - +0.13%)```
1ddca1c toab8f793Compare
In ASSERTIONS-enabled builds, implement a FNV1-a style checksum to the binary decoded Wasm data, and display a help notice about needing to serve the HTML/JS file with UTF-8 encoding. This helps developers identify if their own shell files might not have the necessary encoding.