alexcrichton opened PR #7559 from alexcrichton:fix-cast
to bytecodealliance:main
:
This commit fixes a bug in initializing memory segments of 32-bit memories where if the offset was negative when viewed as a signed integer the offset was incorrectly sign-extended to a 64-bit value instead of zero-extended. This commit replaces an
i32
-to-u64
cast with ani32
-to-u32
cast followed by au32
-to-u64
cast which performs the zero extend.Closes #7558
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #7559.
alexcrichton requested wasmtime-core-reviewers for a review on PR #7559.
abrown submitted PR review.
alexcrichton merged PR #7559.
Last updated: Dec 23 2024 at 13:07 UTC