Skip to content

Conversation

@cfallin
Copy link
Member

@cfallin cfallin commented Apr 8, 2025

In #10502, we introduced changes that could make callsites be arbitrarily long, because they now include loads of return-values-on-stack. We made use of the existing island mechanism (now presented as a new pseudoinst as in aarch64, rather than as ad-hoc emission code) to ensure that we meet label-reference-distance deadlines. Unfortunately we didn't update the debug-assert that checks instructions for worst-case size to exclude calls (and the new EmitIsland pseudoinst), since they handle islanding separately.

Found via fuzzbug at 1.

In bytecodealliance#10502, we introduced changes that could make callsites be
arbitrarily long, because they now include loads of
return-values-on-stack. We made use of the existing island mechanism
(now presented as a new pseudoinst as in aarch64, rather than as ad-hoc
emission code) to ensure that we meet label-reference-distance
deadlines. Unfortunately we didn't update the debug-assert that checks
instructions for worst-case size to exclude calls (and the new
`EmitIsland` pseudoinst), since they handle islanding separately.

Found via fuzzbug at [1].

[1]: https://oss-fuzz.com/testcase-detail/4819793142415360
@cfallin cfallin requested a review from a team as a code owner April 8, 2025 22:42
@cfallin cfallin requested review from abrown and removed request for a team April 8, 2025 22:42
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Apr 8, 2025
@cfallin cfallin requested review from alexcrichton and fitzgen April 9, 2025 00:18
@alexcrichton alexcrichton added this pull request to the merge queue Apr 9, 2025
Merged via the queue into bytecodealliance:main with commit 25a0a0b Apr 9, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants