-
Notifications
You must be signed in to change notification settings - Fork 12.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
Fix leaks from panics in destructors #125923
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in match lowering cc @Nadrieril |
This comment has been minimized.
This comment has been minimized.
087332f
to
b0a0228
Compare
This comment has been minimized.
This comment has been minimized.
b0a0228
to
28ac9be
Compare
@bors try @rust-timer queue r? @pnkfelix (as you've reviewed #78373 3 years ago :3) am looking through these changes myself but would like you to also take a look |
This comment has been minimized.
This comment has been minimized.
Fix leaks from panics in destructors Resurrects rust-lang#78373. This avoids the problem with rust-lang#80949 by not unscheduling drops of function arguments until after the call (so they still get a drop terminator on the function unwind path). Closes rust-lang#47949 r? `@lcnr`
Went through it and mostly understand this PR, am very much not comfortable enough to approve it myself 😅 Thanks @matthewjasper for picking this up again ❤️ really happy about this |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1c34390): 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)Results (primary -1.8%, secondary -4.0%)This 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.
CyclesResults (primary 2.4%, secondary 73.0%)This 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.
Binary sizeResults (primary 1.1%, secondary 1.3%)This 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.
Bootstrap: 673.596s -> 675.825s (0.33%) |
fab4067
to
5a260c7
Compare
5a260c7
to
016ce8f
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
🎉 Experiment
|
Looks like there's a bug somewhere (failures are ICEs) |
☔ The latest upstream changes (presumably #126784) made this pull request unmergeable. Please resolve the merge conflicts. |
Large arrays/tuples can have enough operands that removing items one at a time is significantly slower than creating a hash set first.
When building the MIR we sometimes try to unschedule drops. In this we assert that the drop has already been scheduled. Opaque types however may be initialized with an expression kind that we know doesn't have a type that needs to be dropped. To fix this we don't panic if we can't find the drop of a variable with an opaque type.
093067c
to
5c356c7
Compare
@bors try |
Fix leaks from panics in destructors Resurrects rust-lang#78373. This avoids the problem with rust-lang#80949 by not unscheduling drops of function arguments until after the call (so they still get a drop terminator on the function unwind path). Closes rust-lang#47949 r? `@lcnr`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Finished benchmarking commit (8585d8c): 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)Results (primary 2.9%, secondary -0.7%)This 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.
CyclesResults (primary 1.9%, secondary 3.7%)This 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.
Binary sizeResults (primary 1.1%, secondary 1.3%)This 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.
Bootstrap: 693.722s -> 697.127s (0.49%) |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
I still haven't had a chance to give this a proper review, and I am about to go on vacation for a week. So I'm going to re-roll the review. If it doesn't get reviewed within ten days, feel free to re-assign it to me again. r? compiler-team |
Resurrects #78373.
This avoids the problem with #80949 by not unscheduling drops of function arguments until after the call (so they still get a drop terminator on the function unwind path).
Closes #47949
r? @lcnr