This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

colors in `-fsanitize=bounds' and UBSAN_OPTIONS


I compile and run my program inside Emacs (M-x compile) with 
gcc 5.0.0 20150112 using `-fsanitize=bounds'. Although 
this Emacs buffer is technically a tty, but it is `dumb' and does not 
handle colors properly.

The gcc info concerning `-fsanitize=address' hints that there is a 
parameter ASAN_OPTIONS and the referenced wiki of address-sanitizer 
says that this environment variable can be used to disable the colors. 
Unfortunately and very confusingly, this hint does not help with 
`-fsanitize=bounds', since it uses UBSAN_OPTIONS instead.

I guess the gcc info should be updated to mention UBSAN_OPTIONS.

It would be nice to port the terminal color capability detection code 
from gcc to sanitizer, since gcc itself colorizes the error messages 
properly: by default the colors are on in `xterm', and off in `dumb'.

-- 
Regards,
ASK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]