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

Non-zero return values from LLVMFuzzerTestOneInput should be discouraged #12960

Open
phi-go opened this issue Jan 22, 2025 · 1 comment
Open

Comments

@phi-go
Copy link
Contributor

phi-go commented Jan 22, 2025

Hi, I was investigating a fuzzer target/harness that for some reason failed to create any meaningful coverage. Turns out that libFuzzer discards any inputs where the return value for LLVMFuzzerTestOneInput is non-zero and not only for -1. The documentation for libFuzzer only mentions 0 and -1, while other values are "undefined". While it seems that for Honggfuzz the return value is ignored #11983. This is not documented directly for OSS-Fuzz and as this seems like an easy and potentially severe mistake to make I think the documentation should be expanded.

The use of non-zero exit codes is also something that could potentially be detected and warned of automatically, is this something that you would be interested in?

@phi-go
Copy link
Contributor Author

phi-go commented Jan 22, 2025

I added a PR to update the docs here #12955

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

1 participant