[compiler-rt] r312596 - [sanitizer_common][Fuchsia] Update Fuchsia sanitizer markup

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 17:00:46 PDT 2017


Author: phosek
Date: Tue Sep  5 17:00:46 2017
New Revision: 312596

URL: http://llvm.org/viewvc/llvm-project?rev=312596&view=rev
Log:
[sanitizer_common][Fuchsia] Update Fuchsia sanitizer markup

Include URLs to the markup format specification in code comments.
Use sanitizer markup in the sancov message about a dump just produced.

Patch by Roland McGrath

Differential Revision: https://reviews.llvm.org/D37273

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc?rev=312596&r1=312595&r2=312596&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc Tue Sep  5 17:00:46 2017
@@ -96,10 +96,13 @@ class TracePcGuardController {
       __sanitizer_publish_data(kSancovSinkName, vmo_);
       vmo_ = MX_HANDLE_INVALID;
 
-      // This will route to __sanitizer_log_write, which will ensure
-      // that information about shared libraries is written out.
-      Printf("SanitizerCoverage: published '%s' with up to %u PCs\n", vmo_name_,
-             next_index_ - 1);
+      // This will route to __sanitizer_log_write, which will ensure that
+      // information about shared libraries is written out.  This message
+      // uses the `dumpfile` symbolizer markup element to highlight the
+      // dump.  See the explanation for this in:
+      // https://fuchsia.googlesource.com/magenta/+/master/docs/symbolizer_markup.md
+      Printf("SanitizerCoverage: {{{dumpfile:%s:%s}}} with up to %u PCs\n",
+             kSancovSinkName, vmo_name_, next_index_ - 1);
     }
   }
 

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc?rev=312596&r1=312595&r2=312596&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc Tue Sep  5 17:00:46 2017
@@ -25,8 +25,8 @@ namespace __sanitizer {
 // symbol names, embedded in Fuchsia's symbolization markup format.
 // Fuchsia's logging infrastructure emits enough information about
 // process memory layout that a post-processing filter can do the
-// symbolization and pretty-print the markup.
-// TODO(mcgrathr): URL to markup format document
+// symbolization and pretty-print the markup.  See the spec at:
+// https://fuchsia.googlesource.com/magenta/+/master/docs/symbolizer_markup.md
 
 // This is used by UBSan for type names, and by ASan for global variable names.
 constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";




More information about the llvm-commits mailing list