Skip to content

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Apr 30, 2025

Instead of structurally checking parameters and return types, rely on type canonicalization to dedupe types so that we can simply compare ids. This gets instantiation with the "same" function type defined in a different rec group to properly fail to link.

This does not yet handle function subtyping. That will happen in follow up commits.

@fitzgen fitzgen requested a review from alexcrichton April 30, 2025 21:54
@fitzgen fitzgen changed the title wasmparser:(CM+GC): Validate components' core function linking via type canonicalization wasmparser(CM+GC): Validate components' core function linking via type canonicalization Apr 30, 2025
…nonicalization

Instead of structurally checking parameters and return types, rely on type
canonicalization to dedupe types so that we can simply compare ids. This gets
instantiation with the "same" function type defined in a different rec group to
properly fail to link.

This does not yet handle function subtyping. That will happen in follow up commits.
@fitzgen fitzgen force-pushed the cm-gc-reject-type-in-wrong-rec-group branch from 2cebb55 to 021a4bc Compare April 30, 2025 22:02
@alexcrichton alexcrichton added this pull request to the merge queue May 1, 2025
Merged via the queue into bytecodealliance:main with commit c0f3082 May 1, 2025
32 checks passed
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