Page MenuHomePhabricator

[sanitizer] Split coverage into separate RT in sanitizer_common

Authored by cryptoad on Mar 20 2018, 2:17 PM.



sanitizer_common's coverage support is fairly well separated, and libcdep by
default. Several sanitizers don't make use of coverage, and as far as I can
tell do no benefit from the extra dependencies pulled in by the coverage public
interface functions.

The following sanitizers call InitializeCoverage explicitely: MSan, ASan,
LSan, HWAsan, UBSan. On top of this, any sanitizer bundling RTUBSan should
add the coverage RT as well: ASan, Scudo, UBSan, CFI (diag), TSan, MSan, HWAsan.

So in the end the following have no need: DFSan, ESan, CFI, SafeStack (nolibc
anyway), XRay, and the upcoming Scudo minimal runtime.

I tested this with all the sanitizers check-* with gcc & clang, and in
standalone on Linux & Android, and there was no issue. I couldn't test this on
Mac, Fuchsia, BSDs, & Windows for lack of an environment, so adding a bunch of
people for additional scrunity. I couldn't test HWAsan either.

Diff Detail

Event Timeline

cryptoad created this revision.Mar 20 2018, 2:17 PM
Herald added subscribers: Restricted Project, delcypher, mgorny. · View Herald TranscriptMar 20 2018, 2:17 PM
cryptoad updated this revision to Diff 139197.Mar 20 2018, 2:25 PM

Switching some tabs to spaces in HWAsan's CMakeLists.txt that have gone

alekseyshl accepted this revision.Mar 20 2018, 2:37 PM
This revision is now accepted and ready to land.Mar 20 2018, 2:37 PM
cryptoad updated this revision to Diff 139300.Mar 21 2018, 8:03 AM

Missed adding the coverage RT to TSAN_TEST_RUNTIME_OBJECTS.

If I could get a couple more LGTMs that would be great so that I know people know it's going this direction.

vitalybuka accepted this revision.Mar 21 2018, 10:30 AM
dberris accepted this revision.Mar 21 2018, 2:12 PM

LGTM from XRay.

flowerhack accepted this revision.Mar 21 2018, 3:17 PM

works on Fuchsia

This revision was automatically updated to reflect the committed changes.