[Wasm64] Fix makeSetValue of i64s with WASM_BIGINT#17619
Merged
Conversation
tlively
approved these changes
Aug 10, 2022
sbc100
approved these changes
Aug 11, 2022
sbc100
reviewed
Aug 11, 2022
| 'proxy_to_pthread': (['-sPROXY_TO_PTHREAD', '-sINITIAL_MEMORY=32MB', '-DPROXYING'],), | ||
| # using BigInt support affects the ABI, and should not break things. (this | ||
| # could be tested on either thread; do the main thread for simplicity) | ||
| 'bigint': (['-sPTHREAD_POOL_SIZE=5', '-sWASM_BIGINT'],), |
Collaborator
There was a problem hiding this comment.
Can we modify test/other/test_parseTools.js to test this fix more directly/precisely?
sbc100
approved these changes
Aug 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code here assumed that we can write
HEAP64[ptr>>3]to read ani64 value. That assumes the pointer has 64-bit alignment, which is not the
case with wasm32+WASM_BIGINT.
This fixes a WasmFS issue where we'd pass a pointer to a file size, a
64-bit number, and write it from JS in the fetch backend (specifically the
async jsimpl code that it uses), but this is a much more general issue.
Fixes #17614. The test added here fails before the fix, but perhaps we
should add a specific test for makeSetValue as well? (do we have unit
tests for that @sbc100 ?)