invalid value 'edge' in 'fsantize-coverage=edge' when using LLVM LibFuzzer

僤鯓⒐⒋嵵緔 提交于 2019-12-02 04:15:35

问题


http://llvm.org/docs/LibFuzzer.html I'm doing some works with libfuzzer now but when I do with the official toy example. when i run this command:

clang++ -fsanitize=address -fsanitize-coverage=edge test-fuzzer.cc Fuzzer*.o

there is an error happening that

clang: error: invalid value 'edge' in 'fsanitize-coverage=edge'

it seems that clang supports this argument but i'm wondering how i can see what value is supported... i installed llvm 3.6 by apt-get with unbuntu14.04...


回答1:


The syntax of the fsanitize-coverage= flag has been changed, as described in this commit message from May 2015. This bit is particularly relevant to you:

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

So you might try -fsanitize-coverage=3.



来源:https://stackoverflow.com/questions/35436249/invalid-value-edge-in-fsantize-coverage-edge-when-using-llvm-libfuzzer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!