From 101f1d82ff97ed4e574ed986c3e3b0ece7c1dca8 Mon Sep 17 00:00:00 2001 From: Lorenzo Martignoni Date: Thu, 20 Nov 2014 10:01:08 +0000 Subject: [PATCH] [DFSan] Add flag to dump the labels when the program terminates. Differential Revision: http://reviews.llvm.org/D6306 llvm-svn: 222425 --- compiler-rt/include/sanitizer/dfsan_interface.h | 6 +++ compiler-rt/lib/dfsan/dfsan.cc | 55 +++++++++++++++++++- compiler-rt/lib/dfsan/dfsan.h | 2 + compiler-rt/test/dfsan/dump_labels.c | 69 +++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 compiler-rt/test/dfsan/dump_labels.c diff --git a/compiler-rt/include/sanitizer/dfsan_interface.h b/compiler-rt/include/sanitizer/dfsan_interface.h index bcd4ae0..79dbf2f 100644 --- a/compiler-rt/include/sanitizer/dfsan_interface.h +++ b/compiler-rt/include/sanitizer/dfsan_interface.h @@ -85,6 +85,12 @@ size_t dfsan_get_label_count(void); /// callback executes. Pass in NULL to remove any callback. void dfsan_set_write_callback(dfsan_write_callback_t labeled_write_callback); +/// Writes the labels currently used by the program to the given file +/// descriptor. The lines of the output have the following format: +/// +///