hits for line number reported as unsigned max int
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 170
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 4
Description
When running grcov, we see in our cobertura report that for certain lines, 18446744073709551615 (unsigned max int) number of hits are reported. There is no way we have this many hits in reality, and is probably a bug.
<line number="XXX" hits="18446744073709551615">
for example. I can't share the code, but I will note that it happens in a few seemingly random places, such as an if statement, a closure, and an empty line. What's more, is that the results are not deterministic -- sometimes, we see more lines report with this errant number of hits, sometimes less lines. Although, it appears that the lines that it reports on with this large value are always from the same set of lines, it just doesn't always pick the same number of them.
I also confirmed that this problem happens with lcov reports, so it's likely not isolated to cobertura. The html results do appear to be correct though, with the errant lines reporting somewhere between 0 and 4+ hits. I can't identify any patterns in the lines with this bad value.
Here is the command we are running:
grcov "$CRATES_DIR/$CRATE_NAME" \
--binary-path "$RUST_BUILD_DIR/debug" \
--branch \
--ignore-not-existing \
--output-path "$COVERAGE_BASE_DIR/coverage.xml" \
--output-type cobertura \
--source-dir "$CRATES_DIR/$CRATE_NAME"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported command against a Rust project with branch coverage enabled, comparing the Cobertura, lcov, and HTML outputs. Trace how coverage counts for the affected lines are aggregated and serialized; done means Cobertura and lcov no longer emit 18446744073709551615 and their counts agree with the correct HTML results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100