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

Avoid ICE in coverage builds with bad #[coverage(..)] attributes #131187

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Oct 3, 2024

This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use span_delayed_bug to avoid an inappropriate ICE in that case.

Fixes #127880.

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Oct 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@Zalathar

This comment was marked as resolved.

@Zalathar

This comment was marked as resolved.

@Zalathar
Copy link
Contributor Author

Zalathar commented Oct 3, 2024

I was a silly goose, and this can totally be a normal UI test after all.

@Zalathar Zalathar removed the A-run-make Area: port run-make Makefiles to rmake.rs label Oct 3, 2024
@Zalathar Zalathar changed the title Avoid ICE in non-check builds with bad #[coverage(..)] attributes Avoid ICE in coverage builds with bad #[coverage(..)] attributes Oct 3, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jieyouxu
Copy link
Member

jieyouxu commented Oct 3, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 3, 2024

📌 Commit f3b5343 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2024
@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

jieyouxu commented Oct 3, 2024

@bors r-

test might need //@ needs-profiler-support or something similar to that.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 3, 2024
This code can sometimes witness malformed coverage attributes in builds that
are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in
that case.
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, r=me after PR CI is green.

@Zalathar
Copy link
Contributor Author

Zalathar commented Oct 3, 2024

CI is green.

@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Oct 3, 2024

📌 Commit 8e382ba has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 3, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 3, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 3, 2024
Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes

This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in that case.

Fixes rust-lang#127880.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 3, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131024 (Don't give method suggestions when method probe fails due to bad implementation of `Deref`)
 - rust-lang#131112 (TransmuteFrom: Gracefully handle unnormalized types and normalization errors)
 - rust-lang#131176 (.gitignore files for nix)
 - rust-lang#131183 (Refactoring to `OpaqueTyOrigin`)
 - rust-lang#131187 (Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes)
 - rust-lang#131192 (Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lint)
 - rust-lang#131197 (Avoid emptiness check in `PeekMut::pop`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 28b64d8 into rust-lang:master Oct 4, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2024
Rollup merge of rust-lang#131187 - Zalathar:bad-attr-ice, r=jieyouxu

Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes

This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in that case.

Fixes rust-lang#127880.
@Zalathar Zalathar deleted the bad-attr-ice branch October 4, 2024 01:42
@Urgau
Copy link
Member

Urgau commented Oct 4, 2024

@bors r- merged, but still on the queue

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 4, 2024
@Urgau Urgau added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ICE: unexpected value of coverage attribute
6 participants