about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/spans.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-24 17:43:02 +0000
committerbors <bors@rust-lang.org>2023-08-24 17:43:02 +0000
commitb60e31b673b0d36c50f8e0a3b6f8f077221d983d (patch)
tree60f027079679c46e265b16bbbf915d2972f6e508 /compiler/rustc_mir_transform/src/coverage/spans.rs
parentaa5dbee3ebff8703456e8be3b5fb368fc68fe0d1 (diff)
parent246a6a6589b118c0a08e449f981bb4ae07bc089a (diff)
downloadrust-b60e31b673b0d36c50f8e0a3b6f8f077221d983d.tar.gz
rust-b60e31b673b0d36c50f8e0a3b6f8f077221d983d.zip
Auto merge of #115082 - Zoxc:syntax-context-decode-race, r=cjgillot
Fix races conditions with `SyntaxContext` decoding

This changes `SyntaxContext` decoding to work with concurrent decoding. The `remapped_ctxts` field now only stores `SyntaxContext` which have completed decoding, while the new `decoding` and `local_in_progress` keeps track of `SyntaxContext`s which are in process of being decoding and on which threads.

This fixes 2 issues with the current implementation. It can return an `SyntaxContext` which contains dummy data if another thread starts decoding before the first one has completely finished. Multiple threads could also allocate multiple `SyntaxContext`s for the same `raw_id`.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/spans.rs')
0 files changed, 0 insertions, 0 deletions