-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Hang with weird trait requirement #104225
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
C-bug
Category: This is a bug.
I-compiletime
Issue: Problems and improvements with respect to compile times.
I-hang
Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
cc @compiler-errors I believe this might related to what you were looking at recently |
Hm, don't think so? This doesn't have to with opaques that have higher-ranked (lifetime) vars in their substs. |
Ah! Fair enough, I misremembered what you were working on :) |
This doesn't even have to do with #![recursion_limit = "48"]
fn f<B>(x: Vec<[[[B; 1]; 1]; 1]>) {
is_eq::<_, B>(x);
}
fn is_eq<T: PartialEq<B>, B>(_: T) {}
fn main() {} I'll look into it regardless. |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 21, 2022
…se-sugg, r=lcnr Fix hang in where-clause suggestion with `predicate_can_apply` Using `predicate_may_hold` during error reporting causes an evaluation overflow, which (because we use `evaluate_obligation_no_overflow`) then causes the predicate to need to be re-evaluated locally, which results in a hang. ... but since the "add a where clause" suggestion is best-effort, just throw any overflow errors. No need for 100% accuracy. r? `@lcnr` who has been thinking about overflows... Let me know if you want more context about this issue, and as always, feel free to reassign. Fixes rust-lang#104225
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 28, 2022
Revert rust-lang#104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently 😢 Reopens rust-lang#104225 Fixes rust-lang#104957 r? `@lcnr`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 29, 2022
Revert rust-lang#104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently 😢 Reopens rust-lang#104225 Fixes rust-lang#104957 r? ``@lcnr``
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
I-compiletime
Issue: Problems and improvements with respect to compile times.
I-hang
Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Found with a modified fuzz-rustc.
Code
This input effectively hangs the compiler during
item_types_checking
/ trait selection.Time complexity
The time spent increases exponentially(?) with the complexity of type
x
and with the recursion_limit setting.#![recursion_limit = "16"]
#![recursion_limit = "32"]
#![recursion_limit = "48"]
#![recursion_limit = "128"]
(default)Regression
Regression in nightly-2022-05-28, from #96046. At the same time, the error message changed from E0275 to E0277.
Error before 2022-05-28
E0275: An evaluation of a trait requirement overflowed
Current error
E0277: trait requirement not satisfied
Version
rustc --version --verbose
:@rustbot label +I-compiletime +I-hang
The text was updated successfully, but these errors were encountered: