[Wasm64] Fix makeSetValue of i64s with WASM_BIGINT #17619
Merged
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 ?)