[cfe-dev] external libraries and dataflow sanitizer
Christian Convey
christian.convey at gmail.com
Wed Jan 28 11:13:50 PST 2015
Hello, I was wondering with dataflow sanitizer what the preferred mechanism
is for handling un-instrumented functions in external libraries?
I'm using a fresh download / build of 3.6 from github, specifically llvm,
clang, and compiler-rt. I built them with cmake, and the "check-all" tests
succeeded.
I'm able to run the dataflow sanitizer example code
<http://clang.llvm.org/docs/DataFlowSanitizer.html#example> without a
problem.
I then tweaked the example to also call the "readline" function. Here's
<http://pastebin.com/eUwcNGL7> the modified code. When I tried to build
it, I got an undefined linker error regarding "dfs$readline", shown here
<http://pastebin.com/uLM0wdnA>.
>From the dataflow design document
<http://clang.llvm.org/docs/DataFlowSanitizer.html#id3>, I thought the
solution might be to write my own special-case file. That results in
linker errors regarding functions like "dfsan_create_label", show here
<http://pastebin.com/J6BGr5n1>.
The only solution that worked for me was to create a copy of the existing
blacklist file
"/home/cconvey/src/llvm-install/lib/clang/3.6.0/dfsan_abilist.txt", add an
entry for "readline" to the end of it, and specify that as my blacklist.
That seemed to work fine, shown here <http://pastebin.com/QDgq7q8X>.
Is that the preferred approach for the moment: cloning the
"dfsan_abilist.txt" file, and appending external library functions as
needed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150128/c8cd42a3/attachment.html>
More information about the cfe-dev
mailing list