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

Run Fuzzer on wasm32 Targeted Code #59

Open
almann opened this issue Jan 10, 2022 · 3 comments
Open

Run Fuzzer on wasm32 Targeted Code #59

almann opened this issue Jan 10, 2022 · 3 comments

Comments

@almann
Copy link
Contributor

almann commented Jan 10, 2022

As part of #56, there is a remaining TODO to integrate with the fuzzer. based on the README for rust-fuzz x86-64 is required so we cannot run the fuzzer natively on something like wasm32-wasi.

https://github.com/rust-fuzz/cargo-fuzz/blob/63730da7f95cfb21f6f5a9b0a74532f98d3983a4/README.md?plain=1#L13-L16

In order to integrate with the fuzzer, we may want to take an approach similar to the benchmarking (shim to the WASM and use a WASM runtime to embed the functionality).

@almann almann changed the title Run Fuzzer on WASM Generated Code Run Fuzzer on wasm32 Targeted Code Jan 10, 2022
@hkratz
Copy link
Contributor

hkratz commented Jan 11, 2022

The main problem is that fuzzers usually use coverage information in order to check if a generated test input takes a different path through the testcase. That does not work for JIT-compiled code. Some fuzzers use blackbox fuzzing (based on timing or CPU tracing facilities) but those are less efficient finding problematic inputs.

I am not sure if fuzzing is really necessary, maybe adding some property testing using quickcheck or proptest would be sufficient?

@almann
Copy link
Contributor Author

almann commented Jan 11, 2022

Yeah, this does seem a bit more involved than it would seem worth one's time--did anyone actually do fuzzing on the ARM implementation? Mostly curious to see how platform limited our tooling options are.

To your point, some property based testing might be a suitable substitution here and applicable for platforms where we don't have sufficient support for rust-fuzz and its dependencies.

@hkratz
Copy link
Contributor

hkratz commented Jan 11, 2022

I did some hours of fuzz testing on aarch64 with a Raspberry Pi 4 and (I think) on my Macbook Air M1. cargo fuzz works fine at least on Linux aarch64.

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

No branches or pull requests

2 participants