Comments (2)
Thanks for the report.
I believe this is already fixed in my TOT - so I will push the update shortly.
Note that the root cause is related to data inconsistency: the baseline, current, and source diff data do not agree with each other.
In our case, the issue was that the file paths in the 'diff' file did not match the names in the coverage data; the tool requires that path names be identical (however, see the genhtml --elide-path-mismatch ..
documentation for a workaround).
The bug fix simply removes the call to the undef object (so no crash) - but you will still see the unmapped
error.
The fix also adds some additional text to the output logs, to make it easier to diagnose the cause of the mismatch.
The out-of-range line number issue is commonly caused by one or more of:
- inconsistent baseline/current/diff names - so the tool gets confused about the size of some file
- version mismatches such that genhtml is not looking at the same source code as the data had been generated.
Depending on your project and use model, it can be a good idea to use the--version-script
lcov/genhml option to avoid inconsistencies caused by version differences. - bug in gcc/gcov/llvm/etc such that out-of-range lines appear in the output data.
This is very common in lex/yacc/tablegen output - but also happens in other files.
In those 'other files', the most common case is that gcov (or llvm-cov) report line N+1 in a file containing N lines.
See thegenhtml --synthesize-missing..
,genhtml --filter range...
andgenhtml --ignore range...
options for possible workarounds.
from lcov.
call from undef object should be fixed in 3abff7c.
from lcov.
Related Issues (20)
- geninfo: ERROR: (negative) Unexpected negative hit count '-88' HOT 7
- static function is not included in the coverage. HOT 2
- Support cobertura format as input HOT 10
- genhtml: ERROR: unexpected .info file record 'BFH:0' HOT 7
- What do these symbols for branch coverage mean? HOT 3
- `use "genhtml --ignore-errors source,source ..." to suppress this warning` HOT 6
- line coverage looks strange, with cross compilation and remote collection HOT 5
- Lcov2.0 filters normal branched when --filter branch and no_exception_branch=1 both works HOT 11
- function coverage not hit, then line coverage hit HOT 6
- geninfo settings don't work in config files in v2.1-beta1 or v2.1-beta2 HOT 3
- test_differential in the example now gives error HOT 1
- genhtml is too slow compared to old version HOT 10
- genhtml: --keep-going doesn't work for ERROR: <file> is not readable or doesn't exist. HOT 8
- how to see the verbose error msg? HOT 11
- LCOV 2.1 not compatible with Codecov HOT 9
- LCOV coverage.dat file has "DA:0:0" HOT 3
- lcov on x86 HOT 9
- Duplicate folder structure (--prefix does not help) HOT 2
- gcov error:std::bad_alloc HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcov.