[PATCH] [dfsan] Initial set of custom functions and interceptors for libc.

Peter Collingbourne peter at pcc.me.uk
Wed Aug 14 13:40:31 PDT 2013



================
Comment at: lib/dfsan/CMakeLists.txt:7
@@ +6,3 @@
+  dfsan_custom.cc
+  dfsan_interceptors.cc
+  )
----------------
Alexey Samsonov wrote:
> Let's keep closing parethesis on the same line
Done.

================
Comment at: lib/dfsan/CMakeLists.txt:33
@@ -30,3 +32,3 @@
                                 SOURCES ${CLANG_RESOURCE_DIR}/dfsan_abilist.txt)
 add_custom_command(OUTPUT ${CLANG_RESOURCE_DIR}/dfsan_abilist.txt
                    VERBATIM
----------------
Alexey Samsonov wrote:
> Note that this file won't be copied anywhere when you run "make install". Probably you should do smth. similar (or somehow reuse) add_compiler_rt_resource_file CMake macro.
I dealt with this when I committed D1351.

================
Comment at: lib/dfsan/dfsan_custom.cc:21
@@ +20,3 @@
+#include <ctype.h>
+#include <dlfcn.h>
+#include <stdlib.h>
----------------
Evgeniy Stepanov wrote:
> Alexey Samsonov wrote:
> > We try to avoid including system headers in sanitizer tools, is probability an issue for dfsan?
> It must be less of an issue for dfsan, because it does not have that many interceptors.
> Custom functions do not need to (and, in fact, can not) match system header signature exactly.
If the issue for interceptors is that they redeclare functions which may be macros in the headers, then it won't be an issue for the reasons eugenis mentioned.  If the issue is cross compilation, dfsan doesn't support that yet but I suspect the solution would be to fill in the headers in the SDKs directory.


http://llvm-reviews.chandlerc.com/D1397



More information about the llvm-commits mailing list