-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
snapshot: avoid leaking inference vars #122189
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
snapshot: avoid leaking inference vars A first step towards fixing rust-lang#122188. There are still some FIXMEs left, most notably method probing. fixes rust-lang#122098 r? `@oli-obk`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (970523a): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.903s -> 647.701s (-0.80%) |
let r = f(&snapshot); | ||
let no_leaks_data = R::mk_data_snapshot_end(self, no_leaks_data); | ||
self.rollback_to(snapshot); | ||
R::avoid_leaks(r, self, no_leaks_data) |
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.
Maybe it's sufficient to run this with debug assertions? Or is it usually odd cases that have no tests that leak infer vars?
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.
if we don't fudge TypeError
we can get ICE. I would expect that this is the main cause of the regression here. Can add some inline attributes though to check whether it helps with anything
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
snapshot: avoid leaking inference vars A first step towards fixing rust-lang#122188. There are still some FIXMEs left, most notably method probing. fixes rust-lang#122098 r? `@oli-obk`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (c740aa4): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 648.792s -> 648.87s (0.01%) |
This comment has been minimized.
This comment has been minimized.
9a8da28
to
b0ad8d7
Compare
most other tests have a different root cause. I have not yet fixed method probing as that's non-trivial. Leaving that for future PRs |
if let Some(fudge_data) = fudge_data { | ||
FudgeInference(fudge_data.fudge_inference(infcx, value)) | ||
} else { | ||
FudgeInference(value) |
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.
I like this scheme
@bors r+ I wonder if we can come up with a scheme (that doesn't make all snapshot methods really annoying to use), which also prevents storing types into storage borrowed in the snapshot closure. |
snapshot: avoid leaking inference vars A first step towards fixing rust-lang#122188. There are still some FIXMEs left, most notably method probing. fixes rust-lang#122098 r? `@oli-obk`
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #122832) made this pull request unmergeable. Please resolve the merge conflicts. |
post sync |
This comment was marked as resolved.
This comment was marked as resolved.
@lcnr any updates on this? thanks |
A first step towards fixing #122188. There are still some FIXMEs left, most notably method probing.
fixes #122098
r? @oli-obk