Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Jul 26, 2025

Surprisingly, #144298 alone (extracted from #140847) was enough to re-trigger the failures observed in #141577 (comment).


This reverts commit f877aa7.


r? ghost

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Jul 26, 2025
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Jul 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 26, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@Zalathar
Copy link
Contributor Author

Self-approving a clean revert to fix a clear regression.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 26, 2025

📌 Commit 2b17897 has been approved by Zalathar

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 Jul 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 26, 2025
…thar

Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen"

Surprisingly, rust-lang#144298 alone (extracted from rust-lang#140847) was enough to re-trigger the failures observed in rust-lang#141577 (comment).

---

This reverts commit f877aa7.

---

r? ghost
bors added a commit that referenced this pull request Jul 27, 2025
Rollup of 13 pull requests

Successful merges:

 - #144359 (add codegen test for variadics)
 - #144379 (test using multiple c-variadic ABIs in the same program)
 - #144383 (disable cfg.has_reliable_f128 on amdgcn)
 - #144409 (Stop compilation early if macro expansion failed)
 - #144422 (library/windows_targets: Fix macro expansion error in 'link' macro)
 - #144429 (Enable outline-atomics for aarch64-unknown-linux-musl)
 - #144430 (tests: aarch64-outline-atomics: Remove hardcoded target)
 - #144445 (Fix `./x check bootstrap` (again))
 - #144453 (canonicalize build root in `tests/run-make/linker-warning`)
 - #144464 (Only run bootstrap tests in `x test` on CI)
 - #144470 (clif: Don't set the `compiler-builtins-no-f16-f128` feature)
 - #144480 (Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen")
 - #144495 (bump cargo_metadata)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 27, 2025
Rollup of 13 pull requests

Successful merges:

 - #141840 (If `HOME` is empty, use the fallback instead)
 - #144359 (add codegen test for variadics)
 - #144379 (test using multiple c-variadic ABIs in the same program)
 - #144383 (disable cfg.has_reliable_f128 on amdgcn)
 - #144409 (Stop compilation early if macro expansion failed)
 - #144422 (library/windows_targets: Fix macro expansion error in 'link' macro)
 - #144429 (Enable outline-atomics for aarch64-unknown-linux-musl)
 - #144430 (tests: aarch64-outline-atomics: Remove hardcoded target)
 - #144445 (Fix `./x check bootstrap` (again))
 - #144453 (canonicalize build root in `tests/run-make/linker-warning`)
 - #144464 (Only run bootstrap tests in `x test` on CI)
 - #144470 (clif: Don't set the `compiler-builtins-no-f16-f128` feature)
 - #144480 (Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen")

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8aa3d41 into rust-lang:master Jul 27, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jul 27, 2025
Rollup merge of #144480 - Zalathar:revert-empty-span, r=Zalathar

Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen"

Surprisingly, #144298 alone (extracted from #140847) was enough to re-trigger the failures observed in #141577 (comment).

---

This reverts commit f877aa7.

---

r? ghost
@rustbot rustbot added this to the 1.90.0 milestone Jul 27, 2025
@Zalathar Zalathar deleted the revert-empty-span branch July 27, 2025 08:31
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 29, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang#141577, which was triggered by rust-lang#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang#144480 and rust-lang#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 29, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang#141577, which was triggered by rust-lang#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang#144480 and rust-lang#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 29, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang#141577, which was triggered by rust-lang#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang#144480 and rust-lang#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
rust-timer added a commit that referenced this pull request Jul 29, 2025
Rollup merge of #144616 - Zalathar:try-in-macro, r=jieyouxu

coverage: Regression test for "function name is empty" bug

Regression test for #141577, which was triggered by #144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at #144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (#144480 and #144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 31, 2025
coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- rust-lang#140847
- rust-lang#141650
- rust-lang#144298
- rust-lang#144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- rust-lang#144530
- rust-lang#144560
- rust-lang#144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 31, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang/rust#141577, which was triggered by rust-lang/rust#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang/rust#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang/rust#144480 and rust-lang/rust#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41b8527f9f78e0f2459b50a6e13aea35144 c462895a6f0b463ff0c1c1db2a3a654d7e5976c7
```

---

r? compiler
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 31, 2025
coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- rust-lang#140847
- rust-lang#141650
- rust-lang#144298
- rust-lang#144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- rust-lang#144530
- rust-lang#144560
- rust-lang#144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
rust-timer added a commit that referenced this pull request Jul 31, 2025
Rollup merge of #144663 - Zalathar:empty-span, r=petrochenkov

coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- #140847
- #141650
- #144298
- #144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- #144530
- #144560
- #144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
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) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants