[PATCH] D11981: [asan] On OS X, log reports to syslog and os_trace

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 18:04:15 PDT 2015


kcc added inline comments.

================
Comment at: lib/asan/asan_report.cc:631
@@ +630,3 @@
+// Removes the ANSI escape sequences from the input string (in-place).
+void RemoveANSIEscapeSequencesFromString(char *str) {
+  if (!str)
----------------
glider wrote:
> kcc wrote:
> > zaks.anna wrote:
> > > kcc wrote:
> > > > OMG, no. 
> > > > Instead of removing the ANSI escapes can't we just not emit them? 
> > > We want the colored report to be printed but store the color-less report in the syslog. The buffer we get here, 'error_message_buffer', is exactly what gets printed. So simply using a different decorator would not work, unless we want to generate the report twice..
> > So, you say that a user is going to let asan print the output to screen (not to file!!!)
> > and will still need to have the sys log entry? 
> > 
> > Well, ok... 
> > 
> > Please write a unit test for it (probably in sanitizer_common_test.cc)
> We can store the report in a linked list of strings with ANSI characters emitted to separate strings and marked somehow. Then we can easily reconstruct the report without markup.
OMG, no!


http://reviews.llvm.org/D11981





More information about the llvm-commits mailing list