- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen" #144480
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
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    … codegen" This reverts commit f877aa7.
| Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt | 
| Self-approving a clean revert to fix a clear regression. @bors r+ rollup | 
    
  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
    
  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
    
  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. 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Surprisingly, #144298 alone (extracted from #140847) was enough to re-trigger the failures observed in #141577 (comment).
This reverts commit f877aa7.
r? ghost