Let lsan honor color option

Stephan Bergmann sbergman at redhat.com
Wed Jun 4 09:12:53 PDT 2014


The below change to trunk projects/compiler-rt makes 
ASAN_OPTIONS=detect_leaks=1:color=always colorize the LeakSanitizer 
output as intended:

> Index: lib/lsan/lsan_common.cc
> ===================================================================
> --- lib/lsan/lsan_common.cc	(revision 210183)
> +++ lib/lsan/lsan_common.cc	(working copy)
> @@ -133,7 +133,7 @@
>
>  class Decorator: private __sanitizer::AnsiColorDecorator {
>   public:
> -  Decorator() : __sanitizer::AnsiColorDecorator(PrintsToTtyCached()) { }
> +  Decorator() : __sanitizer::AnsiColorDecorator(ColorizeReports()) { }
>    const char *Error() { return Red(); }
>    const char *Leak() { return Blue(); }
>    const char *End() { return Default(); }

Stephan



More information about the cfe-commits mailing list