fix(reader): reject oversize heap vectors without panicking - #179
Open
VedantMadane wants to merge 1 commit into
Open
fix(reader): reject oversize heap vectors without panicking#179VedantMadane wants to merge 1 commit into
VedantMadane wants to merge 1 commit into
Conversation
- reader.rs: return VecTooLong when Layout::array fails before alloc - decode-errors.wast: unbounded type-section length regression Fixes nasa#158 Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly |
CoreMark Benchmark ResultsCurrent Score: 248.221 |
Kronos3
requested changes
Aug 24, 2026
Kronos3
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution. Looks like some tests are failing! Also one minor nit
Comment on lines
+468
to
+470
| // Reject lengths that cannot form a valid allocation layout. On 32-bit | ||
| // targets Layout::array overflows for huge declared lengths and used to | ||
| // panic inside Vec::new_in; return VecTooLong like the stack path (#158). |
Contributor
There was a problem hiding this comment.
Please remove these comments, I'd rather avoid superfluous comments explaining self document code. The regression test comments are good enough.
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.
Summary
fix(reader): reject oversize heap vectors without panicking
Changes
Fixes #158