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支持此参数,但我想知道如何查看支持的值...
我用unbuntu14.04通过apt-get安装了llvm 3.6

最佳答案

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

关于clang - 使用LLVM LibFuzzer时'fsantize-coverage = edge'中的无效值'edge',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38902683/

10-12 07:36