From 77b02eed7b4d15e5395019d02e8c60fdfdf3ee9c Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 12 Aug 2021 15:11:21 -0500 Subject: Prevent double panic when handling incremental fingerprint mismatch When an incremental fingerprint mismatch occurs, we debug-print our `DepNode` and query result. Unfortunately, the debug printing process may cause us to run additional queries, which can result in a re-entrant fingerprint mismatch error. To avoid a double panic, this commit adds a thread-local variable to detect re-entrant calls. --- compiler/rustc_query_system/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_query_system/src/lib.rs') diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs index 0d4fb34265c..c205f0fb531 100644 --- a/compiler/rustc_query_system/src/lib.rs +++ b/compiler/rustc_query_system/src/lib.rs @@ -3,6 +3,7 @@ #![feature(hash_raw_entry)] #![feature(iter_zip)] #![feature(min_specialization)] +#![feature(thread_local_const_init)] #[macro_use] extern crate tracing; -- cgit 1.4.1-3-g733a5