[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

Kostya Serebryany via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 13:25:52 PDT 2017


kcc added a comment.

>> Will we be able to reuse some of Justin's code instead of creating one more main() function?
> 
> This reuses the code that Justin moved to FuzzMutate/FuzzerCLI.  That's why the main is so short.  But perhaps we could move the main itself into FuzzerCLI?

Yes, having one common main makes sense, but see below.

>> Or, why not link with libFuzzer (-fsanitize=fuzzer at link time) even if we don't us einstrumentation at compile time?
> 
> When I tried this, I got undefined references to all kinds of `__sanitizer_cov_*` symbols.

I'd like to know more. 
At least simple cases work fine:

  clang++ ~/llvm/projects/compiler-rt/test/fuzzer/SimpleTest.cpp -std=c++11  -c && clang++ SimpleTest.o -fsanitize=fuzzer 


https://reviews.llvm.org/D38642





More information about the cfe-commits mailing list