Skip to content

wasm-wave: catch error in UntypedFuncCall::to_wasm_params#2528

Merged
alexcrichton merged 1 commit into
mainfrom
pch/wave_error_check
May 27, 2026
Merged

wasm-wave: catch error in UntypedFuncCall::to_wasm_params#2528
alexcrichton merged 1 commit into
mainfrom
pch/wave_error_check

Conversation

@pchickey
Copy link
Copy Markdown
Contributor

@pchickey pchickey commented May 27, 2026

There was a bug in wasm_wave::UntypedFuncCall::to_wasm_params: when to_wasm_params was called on a function which was parsed with no arguments, the length of the types is never checked to compare it to the arguments.

This change required the iterator accepted by that function to be an ExactSizeIterator so that the length may be checked, and catches the case where an empty list of parameters is applied to a non-empty list of types.

@pchickey pchickey requested a review from a team as a code owner May 27, 2026 00:13
@pchickey pchickey requested review from dicej and removed request for a team May 27, 2026 00:13
@pchickey pchickey force-pushed the pch/wave_error_check branch from 57c5677 to 2951700 Compare May 27, 2026 00:19
@alexcrichton alexcrichton added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit 0ffb828 May 27, 2026
37 checks passed
@alexcrichton alexcrichton deleted the pch/wave_error_check branch May 27, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants