From 1b2f8f4efeb46346625fbd6efc1b15a950e2c773 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 7 May 2014 11:50:14 +0000 Subject: [msan] Fix __msan_check_mem_is_initialized and prettify its output. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208195 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/msan_report.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/msan/msan_report.cc') diff --git a/lib/msan/msan_report.cc b/lib/msan/msan_report.cc index 12bac2e8c..453c81710 100644 --- a/lib/msan/msan_report.cc +++ b/lib/msan/msan_report.cc @@ -235,4 +235,15 @@ void DescribeMemoryRange(const void *x, uptr size) { } } +void ReportUMRInsideAddressRange(const char *what, const void *start, uptr size, + uptr offset) { + Decorator d; + Printf("%s", d.Warning()); + Printf("%sUninitialized bytes in %s%s%s at offset %zu inside [%p, %zu)%s\n", + d.Warning(), d.Name(), what, d.Warning(), offset, start, size, + d.End()); + if (__sanitizer::common_flags()->verbosity > 0) + DescribeMemoryRange(start, size); +} + } // namespace __msan -- cgit v1.2.3