Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit-component: Component validation panics on duplicate imports #1786

Closed
lann opened this issue Sep 13, 2024 · 0 comments · Fixed by #1787
Closed

wit-component: Component validation panics on duplicate imports #1786

lann opened this issue Sep 13, 2024 · 0 comments · Fixed by #1787

Comments

@lann
Copy link
Contributor

lann commented Sep 13, 2024

assert!(map.insert(import.name, ty).is_none());

This is validating correctly but since it can be triggered by real (albeit technically malformed) input wasm it should presumably be a regular error, not a panic.

@lann lann changed the title Component validation panics on duplicate imports wit-component: Component validation panics on duplicate imports Sep 13, 2024
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this issue Sep 13, 2024
Return an error instead since that's more appropriate in this context.

Closes bytecodealliance#1786
github-merge-queue bot pushed a commit that referenced this issue Sep 13, 2024
Return an error instead since that's more appropriate in this context.

Closes #1786
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 a pull request may close this issue.

1 participant