Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented Aug 28, 2025

  1. Rather than assert against this, allow it. We cannot prevent a situation
    where some nested struct.new in a global init ends up with a tricky
    field. Instead, we note the issue later, and recreate the global init.
  2. That recreation logic had an ordering bug: First handle tuples, and
    then also handle ref.as_non_null, as we may end up creating one
    right there.

@kripken kripken requested a review from tlively August 28, 2025 15:15
// TODO: support actual non-nullable externrefs via imported globals or
// similar.
if (!type.isNullable()) {
assert(funcContext);
Copy link
Member

Choose a reason for hiding this comment

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

It might be nice to add a comment about why we can't assert we're in a funcContext here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that is the general case, actually. We shouldn't be asserting on this. The other similar places need updating as well.

@kripken kripken merged commit 60cd24d into WebAssembly:main Aug 28, 2025
16 checks passed
@kripken kripken deleted the fuzz.break branch August 28, 2025 16:38
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