http://llvm.org/docs/LibFuzzer.html 我现在正在与libfuzzer合作,但是当我使用官方玩具示例时。当我运行此命令时:
clang++ -fsanitize=address -fsanitize-coverage=edge test-fuzzer.cc Fuzzer*.o
发生错误
clang: error: invalid value 'edge' in 'fsanitize-coverage=edge'
似乎clang支持这个论点,但我想知道我怎么能看到支持的价值...... 我用apt-get和unbuntu14.04安装llvm 3.6 ......
答案 0 :(得分:2)
fsanitize-coverage=
标志的语法已更改,如2015年5月this commit message中所述。此位与您特别相关:
Original semantics of -fsanitize-coverage flag is preserved:
* -fsanitize-coverage=0 disables the coverage
* -fsanitize-coverage=1 is a synonym for -fsanitize-coverage=func
* -fsanitize-coverage=2 is a synonym for -fsanitize-coverage=bb
* -fsanitize-coverage=3 is a synonym for -fsanitize-coverage=edge
* -fsanitize-coverage=4 is a synonym for -fsanitize-coverage=edge,indirect-calls
所以你可以试试-fsanitize-coverage=3
。