[PATCH] DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".

Peter Collingbourne peter at pcc.me.uk
Wed Aug 14 09:36:30 PDT 2013



================
Comment at: lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:360
@@ +359,3 @@
+  std::string SearchStr = ".symver " + GVName + ",";
+  size_t Pos = Asm.find(SearchStr);
+  if (Pos != std::string::npos) {
----------------
Evgeniy Stepanov wrote:
> This looks really scary. I'm not sure such things belong to the platform-independent instrumentation pass.
Yes this is horrible.  Unfortunately libstdc++ uses .symver directives and without this compilation of libstdc++ will fail.  I'm not sure where else to put it.  (In principle we could send the module inline asm through an MC streamer which does any symbol renaming, but that's probably overkill for this one use case.)


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



More information about the llvm-commits mailing list