Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMulti value! And even more fuzzing! #124
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
It looks like some change here (probably related to blocks having types or making the types shared) is making the types come out in non-deterministic orders. I'm going to solve this with an explicit sorting step for emitting types. |
Nice! Mind running a few benchmarks to ensure that the usage of I'm also curious, could you explain a bit more where the need for interior mutability arose? |
This commit adds support for parsing, emitting, and manipulating multi-value Wasm!
Instead of holding a couple of `Box<[ValType]>`s for parameters and results, now they more accurately reflect the spec (and the multi-value extension of it). For simple, MVP wasm, they hold the optional return value type directly inline. For multi-value, they reference a `TypeId`. See the `NB` comment above `InstrSeqType` for details about why this split is beneficial, and we shouldn't *only* use `TypeId`.
This will let us define custom RNGs that are controlled via libFuzzer and/or AFL, so that we can get coverage-guided fuzzing instead of purely random fuzzing.
Re-uses basically all of our existing fuzzing infrastructure, but uses libfuzzer to drive the "RNG" values that we generate Wat with. This lets us combine the benefits of coverage-guided fuzzing with our existing "structured" fuzzing.
This is not /strictly/ necessary because they are otherwise emitted in the order that they are added, which is usually the order that they are parsed. However, if one were adding types in a non-deterministic order, then we would emit types non-deterministically. Overall, this is just a nice robustness addition.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
fitzgen commentedAug 29, 2019
fixes #77