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

Provide way to run Debug on fuzzer output #47

Closed
Manishearth opened this issue Nov 25, 2019 · 6 comments
Closed

Provide way to run Debug on fuzzer output #47

Manishearth opened this issue Nov 25, 2019 · 6 comments

Comments

@Manishearth
Copy link
Member

Manishearth commented Nov 25, 2019

Currently we just output the string as a list of bytes and as a string, but given that we use Arbitrary types it would be nice if we could Debug the output whenever possible.

This would need https://github.com/rust-fuzz/libfuzzer-sys/issues/46 and another patch to libfuzzer to support custom formatters.

@Manishearth
Copy link
Member Author

Also, given that our use of Arbitrary is nicely hidden, without this feature users of Arbitrary basically have to figure this out themselves.

@Manishearth
Copy link
Member Author

That said, it would be nice if cargo fuzz had a mode for debugging where it could be called with a file and a fuzz target and it feeds the file to the fuzz target via Arbitrary.

@Shnatsel
Copy link
Member

https://github.com/rust-fuzz/honggfuzz-rs provides a mode where it runs the binary with a specific input in debug mode. You can invoke that with one command after discovering the issue in release mode.

@Manishearth
Copy link
Member Author

@fitzgen ultimately what do you think we should do here? Once https://github.com/rust-fuzz/libfuzzer-sys/pull/51 lands , the approach in #48 won't work anymore, but we can add that hook a bit differently to make it work again. Alternatively, we can parse the output in cargo-fuzz to get the artifact path and re-invoke it in a "format" mode.

@fitzgen
Copy link
Member

fitzgen commented Dec 30, 2019

Alternatively, we can parse the output in cargo-fuzz to get the artifact path and re-invoke it in a "format" mode.

I think this approach makes sense.

@fitzgen
Copy link
Member

fitzgen commented Jan 10, 2020

Fixed in #53

@fitzgen fitzgen closed this as completed Jan 10, 2020
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.

3 participants