Skip to content

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 14, 2025

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 #74708,
which was also an ensure_sufficient_stack in this area of code at the
time. However, the refactor in #92573 basically left that
to the general MutVisitor, and then #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.

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.
@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@Mark-Simulacrum
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 14, 2025
rustc_expand: ensure stack in `InvocationCollector::visit_expr`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 14, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 15, 2025

☀️ Try build successful (CI)
Build commit: 573f999 (573f9998e93ec34dfdd88bca871a1bdbab6dcd19, parent: 898aff704d6f0d00343f21d31b8b9bfac8e43007)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (573f999): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-0.4% [-0.8%, -0.2%] 25
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 1

Max RSS (memory usage)

Results (primary 2.4%, secondary -4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-4.1%, -4.1%] 1
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Cycles

Results (secondary 5.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.8% [5.8%, 5.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 3
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 8
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 3

Bootstrap: 470.516s -> 469.329s (-0.25%)
Artifact size: 377.36 MiB -> 377.48 MiB (0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 15, 2025
@lqd
Copy link
Member

lqd commented Aug 15, 2025

r? lqd @bors r+

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

📌 Commit f68bcb3 has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2025
@bors
Copy link
Collaborator

bors commented Aug 22, 2025

⌛ Testing commit f68bcb3 with merge d127901...

@bors
Copy link
Collaborator

bors commented Aug 22, 2025

☀️ Test successful - checks-actions
Approved by: lqd
Pushing d127901 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 22, 2025
@bors bors merged commit d127901 into rust-lang:master Aug 22, 2025
12 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 22, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8e3710e (parent) -> d127901 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard d127901d940d96209fd2ae8ff6769ad2788099fb --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 7978.0s -> 5756.4s (-27.8%)
  2. aarch64-gnu-debug: 5023.3s -> 4401.2s (-12.4%)
  3. aarch64-gnu: 7896.1s -> 6958.5s (-11.9%)
  4. x86_64-gnu-miri: 5183.7s -> 4642.8s (-10.4%)
  5. pr-check-2: 2355.5s -> 2133.1s (-9.4%)
  6. x86_64-rust-for-linux: 2939.1s -> 2705.6s (-7.9%)
  7. i686-gnu-1: 8263.3s -> 7613.5s (-7.9%)
  8. x86_64-gnu-stable: 7538.3s -> 6972.7s (-7.5%)
  9. pr-check-1: 1492.0s -> 1381.6s (-7.4%)
  10. aarch64-apple: 6838.1s -> 6335.8s (-7.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d127901): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary -3.8%, secondary -3.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.8% [-3.8%, -3.8%] 1
Improvements ✅
(secondary)
-3.1% [-3.1%, -3.1%] 1
All ❌✅ (primary) -3.8% [-3.8%, -3.8%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.382s -> 470.79s (-0.13%)
Artifact size: 378.26 MiB -> 378.31 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants