Re: [PATCH] Update 'make fuzz-all' docs to reflect modern clang
- From
Andrzej Hunt <andrzej@ahunt.org>
- Date
- Mar 4, 2021, 15:26 UTC
- Message-ID
- <094d75bf-707a-5b0d-fead-5c9ad08e0a18@ahunt.org>
- In-Reply-To
- <YD1tJlY/mqZOmTNm@google.com>
On 01/03/2021 23:39, Josh Steadmon wrote:
> Thanks for taking a look at this! This looked correct to me, but when I > tried to run the fuzzers I got an error about > "-fsanitize-coverage=trace-pc-guard" not being supported any longer.
Oops, I realised I was accidentally using clang 7 (instead of 11) locally. I can reproduce the same error with my copy of clang-11. Thanks for catching this!
Show 6 quoted lines
> Looking at the LLVM 11.0.0 docs [1], I see that it recommends using > "-fsanitize=fuzzer-no-link" instead (the "-no-link" is because we're > also building executables that have their own main()). > > So we'd also want to change CFLAGS to > "-fsanitize=fuzzer-no-link,address".
I will fix this too!
I suspect that when I built without fuzzer-no-link, the fuzzer binaries included libFuzzer, but were missing whatever fuzzing-related instrumentation clang should have added. (Fortunately oss-fuzz seems to be adding this to the CFLAGS automatically [1].)
[1] https://oss-fuzz-build-logs.storage.googleapis.com/log-74f40f33-f384-475b-b141-0e44afb272f5.txt