-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Revert QueryStackFrame split
#151203
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
Merged
rust-bors
merged 5 commits into
rust-lang:main
from
nnethercote:revert-QueryStackFrame-split
Jan 16, 2026
Merged
Revert QueryStackFrame split
#151203
rust-bors
merged 5 commits into
rust-lang:main
from
nnethercote:revert-QueryStackFrame-split
Jan 16, 2026
+210
−313
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To be consistent with the closely related `cycle_stash` and `cycle_delay_bug`.
Issue rust-lang#124901 was an OOM caused by a query cycle. It was fixed by a complex change in PR rust-lang#138672, but that PR did not add the test case. Let's add it now, because it's the only known reproducer of the OOM.
PR rust-lang#138672 introduced a complex and invasive split of `QueryStackFrame` to avoid a query cycle. This commit reverts that change because there is a much simpler change that fixes the problem, which will be in the next commit.
This changes the error message of `query-cycle-issue-124901.rs`, which doesn't matter much.
Collaborator
|
|
Collaborator
Contributor
|
makes sense. I'd wanna debug this case specifically to see why we even have that cycle, but avoiding the oom with the simpler fix is good for now @bors r+ rollup |
Contributor
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 16, 2026
…i-obk Revert `QueryStackFrame` split PR rust-lang#138672 fixed a query cycle OOM reported in rust-lang#124901. The fix involved delaying computation of some query stack frame elements and was very complex. It involved the addition of two new types, the addition of a generic `I` parameter to eleven(!) other types, a `PhantomData` field, and even required an unsafe transmute of a closure. [This comment](rust-lang#124901 (comment)) had suggested a much simpler fix, but it was ignored. The PR also failed to add a test case. This PR adds a test case, reverts the complex fix, applies the simpler fix, and does a few other minor cleanups. r? @oli-obk
This was referenced Jan 16, 2026
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 16, 2026
Rollup of 6 pull requests Successful merges: - #145354 (Cache derive proc macro expansion with incremental query) - #151123 (Support primitives in type info reflection) - #151178 (simplify words initialization using Rc::new_zeroed) - #151187 (Use `default_field_values` more in `Resolver`) - #151197 (remove lcnr from compiler review rotation) - #151203 (Revert `QueryStackFrame` split) r? @ghost
Contributor
rust-timer
added a commit
that referenced
this pull request
Jan 16, 2026
Rollup merge of #151203 - revert-QueryStackFrame-split, r=oli-obk Revert `QueryStackFrame` split PR #138672 fixed a query cycle OOM reported in #124901. The fix involved delaying computation of some query stack frame elements and was very complex. It involved the addition of two new types, the addition of a generic `I` parameter to eleven(!) other types, a `PhantomData` field, and even required an unsafe transmute of a closure. [This comment](#124901 (comment)) had suggested a much simpler fix, but it was ignored. The PR also failed to add a test case. This PR adds a test case, reverts the complex fix, applies the simpler fix, and does a few other minor cleanups. r? @oli-obk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #138672 fixed a query cycle OOM reported in #124901. The fix involved delaying computation of some query stack frame elements and was very complex. It involved the addition of two new types, the addition of a generic
Iparameter to eleven(!) other types, aPhantomDatafield, and even required an unsafe transmute of a closure. This comment had suggested a much simpler fix, but it was ignored. The PR also failed to add a test case.This PR adds a test case, reverts the complex fix, applies the simpler fix, and does a few other minor cleanups.
r? @oli-obk