Skip to content

Avoid generating ref.as_non_null for table initializers in fuzzer#8928

Open
stevenfontanella wants to merge 1 commit into
mainfrom
fuzzer-table-initializer
Open

Avoid generating ref.as_non_null for table initializers in fuzzer#8928
stevenfontanella wants to merge 1 commit into
mainfrom
fuzzer-table-initializer

Conversation

@stevenfontanella

@stevenfontanella stevenfontanella commented Jul 22, 2026

Copy link
Copy Markdown
Member

Fixes #8911. ref.as_non_null is not a constant expression, so it's not allowed in table initializers. Repro output with this PR.

See the equivalent code in setupGlobals.

@stevenfontanella
stevenfontanella marked this pull request as ready for review July 22, 2026 18:25
@stevenfontanella
stevenfontanella requested a review from a team as a code owner July 22, 2026 18:25
@stevenfontanella
stevenfontanella requested review from tlively and removed request for a team July 22, 2026 18:25

@tlively tlively left a comment

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.

I guess setupGlobals() must already do something similar, but what happens to instructions that reference the table whose type is changed? How are they updated to account for the new type?

Can we add a new .wast file to the test suite that the fuzzer will pick up as initial contents that will trigger this new code path?

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.

Fuzzer generates invalid code for table initializers

2 participants