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

Most upvoted comments

The downgrading of the error to a warning isn’t part of 0.8.0. I’ll release a new version shortly.

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.