Repository navigation
Support u64 limits for wasm 3.0 - #2836
Merged
Merged
Conversation
zherczeg
force-pushed
the
mem64_limits
branch
4 times, most recently
from
August 25, 2026 10:47
9db64aa to
83991a1
Compare
sbc100
reviewed
Aug 25, 2026
| if (has_max) { | ||
| CHECK_RESULT(ReadU32OrU64Leb128(&max, is_64, "table max elem count")); | ||
| CHECK_RESULT(ReadU32OrU64Leb128(&max, options_.features.memory64_enabled(), | ||
| "table max elem count")); |
Member
There was a problem hiding this comment.
Should we just always read this as u64 now?
I guess the natural followup is should have features like memory64 be always-enabled these days? (i.e. now that its stage5?)
sbc100
approved these changes
Aug 25, 2026
sbc100
approved these changes
Aug 26, 2026
Collaborator
Author
|
Sorry, I just saw that there was an update with enable flags. I updated the tests, and now everything green. |
sbc100
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md#structure
The
limitsstructure uses u64 values, regardless the table/memory is i32.This is also true for WebAssembly 3.0:
https://webassembly.github.io/spec/core/binary/types.html#binary-limits
Hence
(memory 0x1_0000_0000)and(table 0x1_0000_0000 funcref))are not-malformed, only invalid now. This patch tries to support this behavior.