Skip to content

Share more core type infrastructure in components#1765

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-validator-panic
Sep 9, 2024
Merged

Share more core type infrastructure in components#1765
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-validator-panic

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit chiefly fixes the validator panic found in #1763. This is done by sharing more infrastructure when validating types between the core module validator and the component validator. This sharing is done by extracting a new trait and moving methods from the core module to the trait and then implementing the trait for both component and core contexts.

When writing tests this additionally discovered that name resolution on core types wasn't happening within components. The fix there was the same as the core module validator which was to extract shared bits to a trait and then implement the trait in both locations.

Closes #1763

This commit chiefly fixes the validator panic found in bytecodealliance#1763. This is
done by sharing more infrastructure when validating types between the
core module validator and the component validator. This sharing is done
by extracting a new trait and moving methods from the core module to the
trait and then implementing the trait for both component and core
contexts.

When writing tests this additionally discovered that name resolution on
core types wasn't happening within components. The fix there was the
same as the core module validator which was to extract shared bits to a
trait and then implement the trait in both locations.

Closes bytecodealliance#1763
@alexcrichton alexcrichton added this pull request to the merge queue Sep 9, 2024
Merged via the queue into bytecodealliance:main with commit 50f63d4 Sep 9, 2024
@alexcrichton alexcrichton deleted the fix-validator-panic branch September 9, 2024 20:45
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.

Panic with uncanonicalized types in components

2 participants