Repository navigation
wasm: fix R2R generic dictionary size-check off-by-one - #129984
Merged
AndyAyersMS merged 1 commit intoJun 29, 2026
Merged
Conversation
The size-check stubs used a strict less-than, so a slot exactly at the dictionary boundary skipped expansion and read past the slots. Use <= to match genericdict.cpp, the interpreter, and the other targets. Co-authored-by: Copilot <[email protected]>
Member
Author
|
Fixes a few pri-1 test failures. @davidwrighton PTAL |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the WASM portable-entrypoint generic dictionary size-check to treat size == slotOffset as out-of-range, ensuring the lookup falls back to the helper path when the dictionary isn’t large enough for the requested slot.
Changes:
- Update the class generic dictionary lookup size check from
<to<=before performing the final indirection. - Update the method generic dictionary lookup size check from
<to<=before performing the final indirection.
davidwrighton
approved these changes
Jun 29, 2026
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
We need to expand the dictionary when size <= slot offset, not size < slot offset. Co-authored-by: Copilot <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We need to expand the dictionary when size <= slot offset, not size < slot offset.