-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Exponential slowdown in catching an overflow
error.
#91949
Comments
Possibly related to #89195? |
Bisected to #85868, cc @Aaron1011 bisected with cargo-bisect-rustc v0.6.1searched nightlies: from nightly-2021-06-01 to nightly-2021-12-08 regressed nightly: nightly-2021-09-03 searched commit range: https://github.com/rust-lang/rust/compare/50171c310cd15e1b2d3723766ce64e2e4d6696fc...371f3cd regressed commit: https://github.com/rust-lang/rust/commit/371f3cd3fe523d0b398ed1db1620667c53ba7d02Host triple: x86_64-unknown-linux-gnu cargo-bisect-rustc -t 3 --start 2021-06-01 --script ./test.sh test.sh: #!/bin/bash
cargo build
exit 0 @rustbot label -E-needs-bisection |
That PR seems incremental-compilation related. This leaves the question of whether the regression also happens without incremental compilation turned on, and whether or not it happens at the same point. |
This is almost certainly the same issue as #89195 then. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
Seems to have fixed the problem, indeed. @rustbot label E-needs-test. |
Rollup of 5 pull requests Successful merges: - rust-lang#97087 (Clarify slice and Vec iteration order) - rust-lang#97254 (Remove feature: `crate` visibility modifier) - rust-lang#97271 (Add regression test for rust-lang#91949) - rust-lang#97294 (std::time : fix variable name in the doc) - rust-lang#97303 (Fix some typos in arg checking algorithm) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This code is not expected to compile successfully:
This can't compile successfully because
recurse<T>
callsrecurse<Map<IteratorOfWrapped<(), T>, [closure@<source>:22:51: 22:58]>>
recursively, which then callsrecurse<Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), T>, [closure@<source>:22:51: 22:58]>>, [closure@<source>:22:51: 22:58]>>
, and so on...However up to stable 1.55, the code failed to compile quickly with the default recursion limit. On the compiler explorer, you can see it even handling
#![recursion_limit = "800"]
without timeout. However, go to 1.56 and it no longer reaches a compilation error in time with#![recursion_limit = "30"]
. Still just as slow on nightly (rustc 1.59.0-nightly (6bda5b331 2021-12-12)
).@rustbot label: regression-from-stable-to-stable, perf-regression, I-compiletime, T-compiler, E-needs-bisection
Comes from: https://users.rust-lang.org/t/compiler-hanging/68804
Rough estimate on my machine: In the area of
recursion_limit
being20
-30
, the time more-than doubles for each increase of the recursion limit by2
or3
, so it really is exponential AFAICT.The text was updated successfully, but these errors were encountered: