Log all of sanitizers' output (not just ASan bug reports) to CrashReport, which simplifies diagnosing failed checks as well as other errors. This also allows to strip the color sequences early from the printed buffer, which is more efficient than what we had perviously.
Details
Diff Detail
Event Timeline
lib/sanitizer_common/sanitizer_mac.h | ||
---|---|---|
50 | Don't we need a lock here? Can we optimize the strcat here (by remembering the position where to append)? Or maybe we could unify this completely with AppendToErrorMessageBuffer (in asan_report.cc), which basically does the same thing. We could only have a single buffer to log into. | |
lib/sanitizer_common/sanitizer_printf.cc | ||
283 | This means that CallPrintfAndReportCallback is now called on a color-less string. I'm actually in favor of this change, but we should make sure everyone's okay with it. |
lib/sanitizer_common/sanitizer_mac.h | ||
---|---|---|
50 |
Yes, we need it. Will address.
I am not convinced that increasing code complexity is worth it in this case. This is logging code...
Currently, AppendToErrorMessageBuffer is ASan specific. We should log output from any sanitizer. | |
lib/sanitizer_common/sanitizer_printf.cc | ||
283 | Yes, calling CallPrintfAndReportCallback on a color-less string seems to be the right thing to do, at least to me. I can update the commit message to call this out. |
Don't we need a lock here? Can we optimize the strcat here (by remembering the position where to append)?
Or maybe we could unify this completely with AppendToErrorMessageBuffer (in asan_report.cc), which basically does the same thing. We could only have a single buffer to log into.