New issue
Advanced search Search tips

Issue 771403 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 4
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 701825



Sign in to add a comment

Coverage issues with component build

Project Member Reported by mmoroz@chromium.org, Oct 3 2017

Issue description

We've tried to switch to component builds in order to resolve issue 701825 (build archive is too large), but then realized that component build has some coverage issues.

------------------------------------------------------------------------
For sancov approach, consider the following examples:

1) static build:

INFO: Loaded 2 modules   (248092 guards): 27552 [0x7efd462d5520, 0x7efd462f03a0), 220540 [0x1a90040, 0x1b67630), 
<...>
#402	DONE   cov: 1869 ft: 1284 corp: 283/87Kb exec/s: 0 rss: 93Mb
Done 402 runs in 0 second(s)
SanitizerCoverage: ./net_parse_ip_pattern_fuzzer.66799.sancov: 1513 PCs written
SanitizerCoverage: ./libc++.so.66799.sancov: 356 PCs written


Assuming that we ignore libc++, we are getting ~5.49% coverage (1513 out of 27552)


2) component build:

INFO: Loaded 12 modules   (276921 guards): 73 [0x7fd3cbd17008, 0x7fd3cbd1712c), 17174 [0x7fd3ced977a0, 0x7fd3ceda83f8), 39195 [0x7fd3d0167bc8, 0x7fd3d018e034), 26327 [0x7fd3cf624bf8, 0x7fd3cf63e754), 34458 [0x7fd3cfb52b48, 0x7fd3cfb745b0), 2501 [0x7fd3cee169a8, 0x7fd3cee190bc), 24489 [0x7fd3cf1dda98, 0x7fd3cf1f593c), 1054 [0x7fd3d16dfec8, 0x7fd3d16e0f40), 4103 [0x7fd3d1787788, 0x7fd3d178b7a4), 2546 [0x7fd3d18978c8, 0x7fd3d189a090), 117240 [0x7fd3d15fb9a8, 0x7fd3d166e188), 7761 [0x620148, 0x627a8c), 
<...>
#402	DONE   cov: 3052 ft: 2538 corp: 373/98Kb exec/s: 0 rss: 132Mb
Done 402 runs in 0 second(s)
SanitizerCoverage: ./net_parse_ip_pattern_fuzzer.54808.sancov: 99 PCs written
SanitizerCoverage: ./libc++.so.54808.sancov: 466 PCs written
SanitizerCoverage: ./libicuuc.so.54808.sancov: 443 PCs written
SanitizerCoverage: ./libicui18n.so.54808.sancov: 168 PCs written
SanitizerCoverage: ./libbase.so.54808.sancov: 1637 PCs written
SanitizerCoverage: ./libnet.so.54808.sancov: 219 PCs written
SanitizerCoverage: ./libprotobuf_lite.so.54808.sancov: 5 PCs written
SanitizerCoverage: ./libbase_i18n.so.54808.sancov: 15 PCs written


We have multiple libs involved, and even if we ignore libc++, we would get ~1.61% (2586 out of 159681), because the libraries have lots of code that our target program does not use.

------------------------------------------------------------------------

For clang coverage, take a look at the following examples: https://paste.googleplex.com/4564498379702272


There is a documentation https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#using-the-profiling-runtime-without-static-initializers that suggests to export "int __llvm_profile_runtime" from each library and some other stuff. That sounds quite complicated for for our scale.
 
Blocking: 701825
Status: WontFix (was: Untriaged)
Not an issue anymore.

Sign in to add a comment