Reputation: 1
I have a question when using dfsan via clang. Blacklist doesn't work.
clang -S -emit-llvm main.c
clang -S -emit-llvm -fsanitize=dataflow main.ll
DFsan changed the name of main function to dfs$main
. In fact, main is in the blacklist, and the main function should not be changed.
But when I use -fsanitize=dataflow
to main.c source file directly, default blacklist works. The name of main function is skipped.
Clang -S -emit llvm -fsanitize=dataflow main.c
the blacklist works, and the main function is not modified. It also works with opt.
opt -dfsan -dfsan-abilist="the_list.txt"
In the construction of DataFlowSanitizer, I find that there is no blacklist-file path passed into it.
Did I miss some options when I use dfsan from clang ?
I mean :
clang -fsanitize=dataflow main.ll (instead of main.c)
Upvotes: 0
Views: 332
Reputation: 341
The corresponding option for clang invocations is -fsanitize-blacklist
:
clang -fsanitize=dataflow -fsanitize-blacklist=file.txt
Relevant documentation: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html
Upvotes: 1