We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3b85d2c + 288380d commit 7de1a1fCopy full SHA for 7de1a1f
compiler/rustc_driver_impl/src/lib.rs
@@ -1327,6 +1327,9 @@ pub fn install_ice_hook(
1327
panic::update_hook(Box::new(
1328
move |default_hook: &(dyn Fn(&PanicInfo<'_>) + Send + Sync + 'static),
1329
info: &PanicInfo<'_>| {
1330
+ // Lock stderr to prevent interleaving of concurrent panics.
1331
+ let _guard = io::stderr().lock();
1332
+
1333
// If the error was caused by a broken pipe then this is not a bug.
1334
// Write the error and return immediately. See #98700.
1335
#[cfg(windows)]
0 commit comments