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

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 15:54:05 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)
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)


More information about the llvm-commits mailing list