about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-03 02:05:14 +0000
committerbors <bors@rust-lang.org>2022-07-03 02:05:14 +0000
commit8c52a83c455f0044e00add954cb7d9ddb0dfb9a3 (patch)
tree318494c16d8cfd0672da2db195f746395bbb5133 /compiler/rustc_codegen_llvm/src
parent5f98537eb7b5f42c246a52c550813c3cff336069 (diff)
parentfbca21edd27dcd6e49a8020ed77a133ffa357c63 (diff)
downloadrust-8c52a83c455f0044e00add954cb7d9ddb0dfb9a3.tar.gz
rust-8c52a83c455f0044e00add954cb7d9ddb0dfb9a3.zip
Auto merge of #98570 - SparrowLii:deadlock, r=cjgillot
get rid of `tcx` in deadlock handler when parallel compilation

This is a very obscure and hard-to-trace problem that affects thread scheduling. If we copy `tcx` to the deadlock handler thread, it will perform unpredictable behavior and cause very weird problems when executing `try_collect_active_jobs`(For example, the deadlock handler thread suddenly preempts the content of the blocked worker thread and executes the unknown judgment branch, like #94654).
Fortunately we can avoid this behavior by precomputing `query_map`. This change fixes the following ui tests failure on my environment when set `parallel-compiler = true`:
```
    [ui] src/test\ui\async-await\no-const-async.rs
    [ui] src/test\ui\infinite\infinite-struct.rs
    [ui] src/test\ui\infinite\infinite-tag-type-recursion.rs
    [ui] src/test\ui\issues\issue-3008-1.rs
    [ui] src/test\ui\issues\issue-3008-2.rs
    [ui] src/test\ui\issues\issue-32326.rs
    [ui] src/test\ui\issues\issue-57271.rs
    [ui] src/test\ui\issues\issue-72554.rs
    [ui] src/test\ui\parser\fn-header-semantic-fail.rs
    [ui] src/test\ui\union\union-nonrepresentable.rs
```

Updates #75760
Fixes #94654
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions