-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some minor issues in
wit-component
(#881)
* Fuzz the `ComponentEncoder` type in `roundtrip-wit` Pushing out recent WIT changes to the `wit-bindgen` project exposed a few bugs in `ComponentEncoder` so I've chosen to get the bugs exposed through fuzzing and then have fuzzing tell me what else I should fix. * Add support for top-level functions in `wit-component` Accidentally left out from the prior PR this fills in a panic and then fills out the implementation of creating a component which has top-level function imports. * Better account for type size in fuzzing function signatures The previous logic attempted to disallow large types but the fuzzer still found shapes of input that generated too-large types for parsing/validation. This commit instead reworks with a fuel-based approach where fuel is discounted as soon as a recursive variant is chosen instead of after-the-fact. This limits the size of recursive structures since it's known ahead of time when a recursive branch cannot be taken and fuel is already accounted for in other branch like the error of a result. * Change a `return` to a `continue` Silly mistake I made in the `add_live_imports` function. * Bump the wit-component crate to 0.4.1 * Fix an assert in decoding to work around upstream issue This commit works around WebAssembly/component-model#151 by relaxing an assert since it can trip today. A test is added as well which shows the invalid-ly decoded document which comes from the component itself.
- Loading branch information
1 parent
a1fdde0
commit 208b2e7
Showing
18 changed files
with
415 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.