Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WASM ABI 1.0] Fix bytes_source_read #1646

Merged
merged 1 commit into from
Aug 28, 2024
Merged

[WASM ABI 1.0] Fix bytes_source_read #1646

merged 1 commit into from
Aug 28, 2024

Conversation

kim
Copy link
Contributor

@kim kim commented Aug 28, 2024

When decoding reducer args, bytes_source_read would incorrectly set
instead of advance the read cursor, causing decoding of large args to
fail.

Expected complexity level and risk

1

Testing

This would cause non-public tests to fail, which use large reducer args.
We may want to create a large-args test case here as well.

When decoding reducer args, `bytes_source_read` would incorrectly set
instead of advance the read cursor, causing decoding of large args to
fail.
@kim kim requested a review from Centril August 28, 2024 12:26
@@ -848,7 +848,7 @@ impl WasmInstanceEnv {
env.call_reducer_args = None;
Ok(-1i32)
} else {
*cursor = can_read_len;
*cursor += can_read_len;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Centril why did this pass all the smoketests? Can we add test coverage for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaiu, it only fails when the reducer args are past a certain size. I didn't look close enough to know what size exactly, perhaps then we can make a test which fails in this repo.

@bfops bfops requested a review from coolreader18 August 28, 2024 17:34
@kim kim added this pull request to the merge queue Aug 28, 2024
Merged via the queue into master with commit bba3572 Aug 28, 2024
9 checks passed
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.

3 participants