ASan's report decoration doesn't maintain any state regarding terminal color output. When printing shadow bytes, one printed byte involves two color changes, even if subsequent bytes are the same color. This patch ensures a decorator only changes the terminal output color when printing a byte of a different color. This significantly reduces the number of characters in the output when printing shadow bytes without changing how the output looks.
Details
Details
Diff Detail
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
compiler-rt/lib/asan/asan_descriptions.h | ||
---|---|---|
48 | what was changed here? | |
60 | lets keep same name const char *Default() { last_byte = 0; return __sanitizer::SanitizerCommonDecorator::Default(); } | |
122 | u8 last_byte = 0; | |
122 | maybe instead of last byte just track "const char * last_decoration"? |
Comment Actions
- Fixed diff issues.
- Tracking last decoration as opposed to last byte.
- Changed Reset() to be Default().
Comment Actions
I don't think text decoration was tested in any way. Adding an integration test would be reasonable, I'll look into that.
what was changed here?
Did you use arc tool?