grcov: [ERROR] Execution count overflow detected.
I’m getting [ERROR] Execution count overflow detected.
when running with this setup:
rustup component add llvm-tools-preview
RUSTFLAGS="-Zinstrument-coverage"
QUICKCHECK_TESTS=1
cargo +nightly build --all-features --workspace
LLVM_PROFILE_FILE="test-%p-%m.profraw" cargo +nightly test --all-features --workspace
grcov --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "/*" -o ./coverage/ .
Also sometimes, trying different ways of making grcov
work, I’m getting [ERROR] FN 'ink_env::backend::ReturnFlags::set_reverted' duplicated for 'crates/env/src/backend.rs' in a lcov file
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 17
- Comments: 17
Commits related to this issue
- ci: make coverage job manual It's broken atm, likely because of https://github.com/mozilla/grcov/issues/555 — committed to sdroege/gstreamer-rs by deleted user 3 years ago
- [CI] Fix coverage * grcov v0.7.1 causes problems for now, so use v0.6.1 * Use source-based coverage https://github.com/mozilla/grcov/issues/555 https://github.com/mozilla/grcov/issues/575 — committed to openrr/openrr by OTL 3 years ago
- [CI] Fix coverage * grcov v0.7.1 causes problems for now, so use v0.6.1 * Use source-based coverage https://github.com/mozilla/grcov/issues/555 https://github.com/mozilla/grcov/issues/575 — committed to openrr/openrr by OTL 3 years ago
- [CI] Fix coverage * grcov v0.7.1 causes problems for now, so use v0.6.1 * Use source-based coverage https://github.com/mozilla/grcov/issues/555 https://github.com/mozilla/grcov/issues/575 — committed to openrr/openrr by OTL 3 years ago
- [CI] Fix coverage * grcov v0.7.1 causes problems for now, so use v0.6.1 * Use source-based coverage https://github.com/mozilla/grcov/issues/555 https://github.com/mozilla/grcov/issues/575 — committed to openrr/openrr by OTL 3 years ago
- chore: degrade the overflow error to a warning Closes #555 — committed to drahnr/grcov by drahnr 3 years ago
- Degrade the overflow error to a warning (#611) Closes #555 — committed to mozilla/grcov by drahnr 3 years ago
The downgrading of the error to a warning isn’t part of 0.8.0. I’ll release a new version shortly.
Actually I forgot we are already clamping to the max (https://github.com/mozilla/grcov/blob/f2c4b95ab339e7edc76400877a26fc131dff159c/src/lib.rs#L72-L75). So we just need to turn this error into a warning https://github.com/mozilla/grcov/blob/f2c4b95ab339e7edc76400877a26fc131dff159c/src/lib.rs#L145.
Maybe if the error can be ignored and in fact things are working OK in terms of coverage of lines (but not counts for the lines exceeding u64::MAX I assume), it could be a WARN warning, with a message to say it only will affect you if you are paying attention to line counts?
Just a note: you can ignore this error most of the times. It means a line was hit so often (probably not actually, but due to some instrumentation error) that it exceeds the maximum number that can be represented by a u64.
I’m facing the same issue while trying to run grcov against https://github.com/uutils/coreutils.