Skip to content

Do not OOM on memory measurement (grow of 0) - #9265

Closed
kripken wants to merge 2 commits into
WebAssembly:mainfrom
kripken:grow.idem
Closed

kripken wants to merge 2 commits into
WebAssembly:mainfrom
kripken:grow.idem

Conversation

@kripken

@kripken kripken commented Oct 15, 2026

Copy link
Copy Markdown
Member

memory.grow of 0 changes nothing and just returns the old size. On the
fuzzer this was erroring, as we did reallocate and OOMed, while v8 did
not.

@kripken
kripken requested a review from a team as a code owner October 15, 2026 16:10
@kripken
kripken requested review from tlively and removed request for a team October 15, 2026 16:10
//
// The only case where we are always ok to remove such casts is when lastOpts
// is true, because nothing significant runs after us that can be harmed. That
// logic is in the StripRefiningCasts pass.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Drive-by comment?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes.

@kripken

kripken commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Unfortunately this is not enough, as VM differences in grow success now show up (due to the new testcase). I suppose we just need to limit memory sizes in the fuzzer...

@kripken

kripken commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #9269

@kripken kripken closed this Oct 19, 2026
@kripken
kripken deleted the grow.idem branch October 19, 2026 16:30
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.

2 participants