Implement a FNV1-a style checksum to the binary decoded Wasm data in debug builds#25910
Implement a FNV1-a style checksum to the binary decoded Wasm data in debug builds#25910juj wants to merge 4 commits intoemscripten-core:mainfrom
Conversation
|
Are we sure this usefull though? In particular it would not have helped with #25906 would it? Adding more magic |
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.
Ok sounds good!
lgtm % comment
…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 by running the tests with `--rebaseline`: ``` codesize/test_codesize_hello_O0.json: 39332 => 39358 [+26 bytes / +0.07%] test/codesize/test_codesize_minimal_O0.expected.js updated codesize/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 to
ab8f793
Compare
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.