-
Notifications
You must be signed in to change notification settings - Fork 13.3k
A used function should have had coverage mapping data but did not #118850
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
@rustbot label +T-compiler +A-code-coverage |
This was referenced Dec 12, 2023
This ICE does not occur on current stable/beta, but does occur on nightly. @rustbot label +regression-from-stable-to-nightly |
(This will be fixed by #118852, which is awaiting review.) |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 18, 2023
Rollup merge of rust-lang#118852 - Zalathar:no-spans, r=cjgillot coverage: Skip instrumenting a function if no spans were extracted from MIR The immediate symptoms of rust-lang#118643 were fixed by rust-lang#118666, but some users reported that their builds now encounter another coverage-related ICE: ``` error: internal compiler error: compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs:98:17: A used function should have had coverage mapping data but did not: (...) ``` I was able to reproduce at least one cause of this error: if no relevant spans could be extracted from a function, but the function contains `CoverageKind::SpanMarker` statements, then codegen still thinks the function is instrumented and complains about the fact that it has no coverage spans. This PR prevents that from happening in two ways: - If we didn't extract any relevant spans from MIR, skip instrumenting the entire function and don't create a `FunctionCoverateInfo` for it. - If coverage codegen sees a `CoverageKind::SpanMarker` statement, skip it early and avoid creating `func_coverage`. --- Fixes rust-lang#118850.
This was referenced Jan 16, 2024
ti-chi-bot bot
pushed a commit
to PingCAP-QE/ci
that referenced
this issue
Jan 17, 2024
After this change we still need to wait tikv to update the rust toolchain to a newer version before this script can succeed due to rust-lang/rust#118850
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The immediate symptoms of #118643 were fixed by #118666, but some users reported that their builds now encounter another coverage-related ICE:
#118643 (comment)
#118643 (comment)
The text was updated successfully, but these errors were encountered: