Skip to content

Fix TypeRefining-GUFA on unreachable StructCmpxchg - #9113

Open
kripken wants to merge 4 commits into
WebAssembly:mainfrom
kripken:gufa-tr.nonun
Open

kripken wants to merge 4 commits into
WebAssembly:mainfrom
kripken:gufa-tr.nonun

Conversation

@kripken

@kripken kripken commented Sep 17, 2026

Copy link
Copy Markdown
Member

If the replacement value is not unreachable, we still need to fix it up.

Also add TODOs for StructWait here and in other passes (which will
have similar issues). cc @stevenfontanella who I think added that
class.

@kripken
kripken requested a review from a team as a code owner September 17, 2026 18:59
@kripken
kripken requested review from stevenfontanella and removed request for a team September 17, 2026 18:59
Comment on lines +558 to +559
// unreachable one). In that case, the replacement must still validate
// as if it were written, so we must fix it up below.

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.

Maybe we could relax this in the validator. I don't think we're consistent about how we enforce requirements on non-unreachable children of unreachable expressions.

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.

Hmm, that might be another option. Though I think stricter validation (like we have now) is generally the thing to aim for?

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.

(Agree the current validator might not be consistent on this, though...)

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.

Yep, sounds fine to me.

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