Skip to content

Exponential compile time with invalid use of modifying-assignment operators #117690

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

Open
jruderman opened this issue Nov 7, 2023 · 1 comment
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jruderman
Copy link
Contributor

jruderman commented Nov 7, 2023

Found by fuzzing and probably only affects fuzzing

Code

fn a() {
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1 += & 
    1
}

Where it's slow

According to -Z time-passes the slowness is within type_check_crate.

check_expr_coercible_to_type is on the stack multiple times (sample head)

Regression

Regression in nightly-2023-04-30, maybe due to #110877?

Commits in range
  commit[0] 2023-04-28UTC: Auto merge of #110901 - GuillaumeGomez:inlined-repr-rustdoc, r=notriddle
  commit[1] 2023-04-28UTC: Auto merge of #110967 - matthiaskrgr:rollup-vfbl7gm, r=matthiaskrgr
  commit[2] 2023-04-29UTC: Auto merge of #110643 - pietroalbini:pa-bump-stage0, r=Mark-Simulacrum
  commit[3] 2023-04-29UTC: Auto merge of #110978 - Dylan-DPC:rollup-xclzwax, r=Dylan-DPC
  commit[4] 2023-04-29UTC: Auto merge of #108106 - the8472:layout-opt, r=wesleywiser
  commit[5] 2023-04-29UTC: Auto merge of #110992 - bjorn3:sync_cg_clif-2023-04-29, r=bjorn3
  commit[6] 2023-04-29UTC: Auto merge of #110994 - matthiaskrgr:rollup-wv4u5yi, r=matthiaskrgr
  commit[7] 2023-04-29UTC: Auto merge of #110576 - jyn514:unify-test-args, r=ozkanonur

Version

rustc 1.75.0-nightly (fee5518cd 2023-11-05)
binary: rustc
commit-hash: fee5518cdd4435c60a57fe3bb734fc1a14abeb7a
commit-date: 2023-11-05
host: x86_64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.4
@jruderman jruderman added the C-bug Category: This is a bug. label Nov 7, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 7, 2023
@jruderman
Copy link
Contributor Author

@rustbot label +I-compiletime

@rustbot rustbot added the I-compiletime Issue: Problems and improvements with respect to compile times. label Nov 7, 2023
@saethlin saethlin added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants