-
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
Clear response values for overflow in new solver #110614
Merged
bors
merged 2 commits into
rust-lang:master
from
compiler-errors:new-solver-overflow-response
Apr 29, 2023
Merged
Clear response values for overflow in new solver #110614
bors
merged 2 commits into
rust-lang:master
from
compiler-errors:new-solver-overflow-response
Apr 29, 2023
Conversation
This file contains 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
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.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
labels
Apr 20, 2023
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
lcnr
reviewed
Apr 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after nit
compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs
Outdated
Show resolved
Hide resolved
lcnr
reviewed
Apr 26, 2023
lcnr
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Apr 26, 2023
rust-cloud-vms
bot
force-pushed
the
new-solver-overflow-response
branch
from
April 26, 2023 22:39
645a279
to
ee89421
Compare
@bors r=lcnr |
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Apr 27, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 27, 2023
…w-response, r=lcnr Clear response values for overflow in new solver When we have an overflow, return a trivial query response. This fixes an ICE with the code described in rust-lang#110544: ```rust trait Trait {} struct W<T>(T); impl<T, U> Trait for W<(W<T>, W<U>)> where W<T>: Trait, W<U>: Trait, {} fn impls<T: Trait>() {} fn main() { impls::<W<_>>() } ``` Where, while proving `W<?0>: Trait`, we overflow but still apply the query response of `?0 = (W<?1>, W<?2>)`. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like `?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)`, and so we trigger the ICE. Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver. r? `@lcnr`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Apr 28, 2023
…w-response, r=lcnr Clear response values for overflow in new solver When we have an overflow, return a trivial query response. This fixes an ICE with the code described in rust-lang#110544: ```rust trait Trait {} struct W<T>(T); impl<T, U> Trait for W<(W<T>, W<U>)> where W<T>: Trait, W<U>: Trait, {} fn impls<T: Trait>() {} fn main() { impls::<W<_>>() } ``` Where, while proving `W<?0>: Trait`, we overflow but still apply the query response of `?0 = (W<?1>, W<?2>)`. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like `?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)`, and so we trigger the ICE. Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver. r? ``@lcnr``
⌛ Testing commit ee89421 with merge e290b2472b9580af143784f309ef4259c4a1b9fa... |
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Apr 28, 2023
@bors retry python setuptools issue |
bors
removed
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Apr 28, 2023
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Apr 28, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 29, 2023
…w-response, r=lcnr Clear response values for overflow in new solver When we have an overflow, return a trivial query response. This fixes an ICE with the code described in rust-lang#110544: ```rust trait Trait {} struct W<T>(T); impl<T, U> Trait for W<(W<T>, W<U>)> where W<T>: Trait, W<U>: Trait, {} fn impls<T: Trait>() {} fn main() { impls::<W<_>>() } ``` Where, while proving `W<?0>: Trait`, we overflow but still apply the query response of `?0 = (W<?1>, W<?2>)`. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like `?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)`, and so we trigger the ICE. Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver. r? `@lcnr`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 29, 2023
Rollup of 6 pull requests Successful merges: - rust-lang#110614 (Clear response values for overflow in new solver) - rust-lang#110894 (Bump libffi-sys to 2.3.0) - rust-lang#110932 (include source error for LoadLibraryExW) - rust-lang#110958 (Make sure that some stdlib method signatures aren't accidental refinements) - rust-lang#110962 (Make drop_flags an IndexVec.) - rust-lang#110965 (Don't duplicate anonymous lifetimes for async fn in traits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
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.
When we have an overflow, return a trivial query response. This fixes an ICE with the code described in #110544:
Where, while proving
W<?0>: Trait
, we overflow but still apply the query response of?0 = (W<?1>, W<?2>)
. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)
, and so we trigger the ICE.Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver.
r? @lcnr