Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hits for line number reported as unsigned max int #960

Open
ndalton12 opened this issue Feb 8, 2023 · 1 comment
Open

hits for line number reported as unsigned max int #960

ndalton12 opened this issue Feb 8, 2023 · 1 comment

Comments

@ndalton12
Copy link

ndalton12 commented Feb 8, 2023

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"
@ndalton12
Copy link
Author

as a fun aside, the parser built in to AWS Code Build will not parse hits="18446744073709551615" as the number is too big :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant