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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative to #2106 which was based on fuzzing through udp. The same approach doesn't work for tcp because of state, and because it'll disconnect on bad data.
Combine NANO_FUZZER_TEST with a sanitizer such as ASAN, and RelWithDebugInfo.
This PR is more limited and tests buffer parsing for live messages - coverage thus also includes vote/block uniquer. It seems to reliably catch any manually introduced memory issues in those areas with ASAN on.
I propose we add fuzzer binaries for additional areas we wanna cover in separate PRs.
With NANO_FUZZER_TEST on,
work_value
is conditionally compiled to always succeed.It's a bit of a challenge to build with libFuzzer on some platforms, i.e on latest clang on macos I had to symlink libclang_rt.fuzzer_osx.a from llvm 7.0 installed via brew - lemme know if there are better ways to deal with this.