Commit f68bcb3
committed
rustc_expand: ensure stack in
In Fedora, when we built rustc with PGO on ppc64le, we started failing
the test `issue-74564-if-expr-stack-overflow.rs`. This could also be
reproduced on other arches by setting a smaller `RUST_MIN_STACK`, so
it's probably just unlucky that ppc64le PGO created a large stack frame
somewhere in this recursion path. Adding an `ensure_sufficient_stack`
solves the stack overflow.
Historically, that test and its fix were added in rust-lang#74708,
which was also an `ensure_sufficient_stack` in this area of code at the
time. However, the refactor in rust-lang#92573 basically left that
to the general `MutVisitor`, and then rust-lang#142240 removed even
that ensure call. It may be luck that our tier-1 tested targets did not
regress the original issue across those refactors.InvocationCollector::visit_expr
1 parent be00ea1 commit f68bcb3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
2437 | 2438 | | |
2438 | 2439 | | |
2439 | 2440 | | |
2440 | | - | |
| 2441 | + | |
2441 | 2442 | | |
2442 | 2443 | | |
2443 | 2444 | | |
| |||
0 commit comments