saulecabrera opened PR #10056 from saulecabrera:winch-imported-globals-fuzzbug
to bytecodealliance:main
:
This commit fixes a fuzz-bug. See the test case for details.
Prior to this commit, imported global addresses were calculated with register offset addressing, using the scratch register as the base. With imported globals, the caller must load the address into an allocatable register which implies that in presence of spills the scratch register would get clobbered, affecting the previously loaded imported global address.
This commit fixes the issue by returning an allocatable register, along with the offset and global type, which is expected to be freed by the caller after emitting the global load or store.
<!--
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
-->
saulecabrera requested fitzgen for a review on PR #10056.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #10056.
saulecabrera requested wasmtime-core-reviewers for a review on PR #10056.
github-actions[bot] commented on PR #10056:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton submitted PR review.
alexcrichton merged PR #10056.
Last updated: Jan 24 2025 at 00:11 UTC