Commit 786d828
authored
Rollup merge of #148306 - zetanumbers:expn_id_decode, r=nnethercote
Remove double check when decoding ExpnId to avoid races
Fixes debug assertion failure as described in #141540 (comment)
Essentially failure happens during the race while decoding one `ExpnId` from different threads. This ICE doesn't happen with single threaded thread_pool due to early return within `decode_expn_id` with the same condition:
https://github.com/rust-lang/rust/blob/8205e6b75ec656305ac235d4726d2c7a1ddcef14/compiler/rustc_middle/src/query/on_disk_cache.rs#L605-L607
However I believe this race does not hurt because `register_expn_id` is pretty much idempotent:
https://github.com/rust-lang/rust/blob/8205e6b75ec656305ac235d4726d2c7a1ddcef14/compiler/rustc_span/src/hygiene.rs#L1397-L14131 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
1563 | | - | |
1564 | 1563 | | |
1565 | 1564 | | |
1566 | 1565 | | |
| |||
0 commit comments