这是indexloc提供的服务,不要输入任何密码
Skip to content

Decrease ring buffer size to 2^31 - 1 which is wasm limit #9341

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

Merged
merged 2 commits into from
Jul 23, 2025

Conversation

biggs0125
Copy link
Contributor

Wasm sets a hard limit of 2^31 - 1 bytes on Uint8Lists:
https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/wasm/lib/typed_data.dart#L38

This is 1 more than the value that was previously specified here. When these buffers were reaching their max size this was causing a range check error:

RangeError: Invalid value: Not in inclusive range 0..2147483647: 2147483648

@kevmoo
Copy link
Contributor

kevmoo commented Jul 23, 2025

(1 << 31) - 1 is SO much more simple than the code there. I'd also add a note about why the -1 is important.

@elliette
Copy link
Member

Note: Failure is because timeline_events_controller needs to be formatted

@biggs0125 biggs0125 merged commit a9bf8c9 into flutter:master Jul 23, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants