colors in `-fsanitize=bounds' and UBSAN_OPTIONS
Alexander Klimov
alserkli@inbox.ru
Mon Jan 19 17:48:00 GMT 2015
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
More information about the Gcc
mailing list