-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Give deadlock handler access to GlobalCtxt
#121971
Conversation
This comment has been minimized.
This comment has been minimized.
1f3976a
to
bcaca33
Compare
You might need to opt |
@@ -311,6 +318,12 @@ impl Compiler { | |||
{ | |||
// Must declare `_timer` first so that it is dropped after `queries`. | |||
let mut _timer = None; | |||
let _guard = rustc_data_structures::defer(|| { |
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 think it would make more sense for this to be declared after queries
so that we store null
before the destructor of GlobalCtxt
gains unique access, even though it offers no synchronization.
☔ The latest upstream changes (presumably #122241) made this pull request unmergeable. Please resolve the merge conflicts. |
Doesn't work yet, because we try to share a
Compiler
across thread boundaries, which mostly doesn't work because some things likeFreezeLock
are notSync
, but onlyDynSync
.intended as a replacement for #115220
cc @Zoxc do you think this is doable once we nuke the non-parallel-compiler cfgs and do some cleanups by using the thread safe sync primitives everywhere?