From ae52ac74790fe041dee7724f32b6132c7ca3c7e1 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 15 Aug 2013 18:51:07 +0000 Subject: [PATCH] [dfsan] Runtime support for -dfsan-debug-nonzero-labels feature. Reviewers: eugenis CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1406 llvm-svn: 188471 --- compiler-rt/lib/dfsan/dfsan.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler-rt/lib/dfsan/dfsan.cc b/compiler-rt/lib/dfsan/dfsan.cc index 162549f2569b..7e84337bd19d 100644 --- a/compiler-rt/lib/dfsan/dfsan.cc +++ b/compiler-rt/lib/dfsan/dfsan.cc @@ -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