[dfsan] Runtime support for -dfsan-debug-nonzero-labels feature.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 15 Aug 2013 18:51:07 +0000 (18:51 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 15 Aug 2013 18:51:07 +0000 (18:51 +0000)
Reviewers: eugenis

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1406

llvm-svn: 188471

compiler-rt/lib/dfsan/dfsan.cc

index 162549f2569b560a068f6ea638d0810907b4ffa0..7e84337bd19dae331c7a96c20b051c8fef6240fa 100644 (file)
@@ -136,6 +136,11 @@ void __dfsan_unimplemented(char *fname) {
          fname);
 }
 
+// Use '-mllvm -dfsan-debug-nonzero-labels' and break on this function
+// to try to figure out where labels are being introduced in a nominally
+// label-free program.
+extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __dfsan_nonzero_label() {}
+
 // Like __dfsan_union, but for use from the client or custom functions.  Hence
 // the equality comparison is done here before calling __dfsan_union.
 SANITIZER_INTERFACE_ATTRIBUTE dfsan_label