elliottt opened PR #8385 from elliottt:trevor/x64-return-call-indirect-bug
to bytecodealliance:main
:
When we changed how
return_call
is handled during instruction emission, we assumed thatr11
would always be safe to use as it's a caller-save register on x64. However, this also means that it's available to RA2 for allocation, and could end up holding the destination of areturn_call_indirect
. To fix this, I've added a temporary writable register to the x64ReturnCallInfo
structure, and marked it with an early def constraint to ensure that it won't conflict with the destination of an indirect call.
<!--
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
-->
elliottt requested abrown for a review on PR #8385.
elliottt requested wasmtime-compiler-reviewers for a review on PR #8385.
elliottt requested alexcrichton for a review on PR #8385.
elliottt requested jameysharp for a review on PR #8385.
fitzgen submitted PR review.
elliottt updated PR #8385.
elliottt updated PR #8385.
elliottt updated PR #8385.
jameysharp submitted PR review:
Looks great, thank you!
elliottt merged PR #8385.
Last updated: Dec 23 2024 at 12:05 UTC