crashes: Avoid crash handler on detached threads (#40883)

Set a TLS bit to skip invoking the crash handler when a detached thread
panics.

cc @P1n3appl3 - is this at odds with what we need the crash handler to
do?

May close #39289, cannot repro without a nightly build

Release Notes:

- Fixed extension panics crashing Zed on Linux

Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
Nia
2025-10-23 21:04:22 +00:00
committed by GitHub
co-authored by dino
parent 1ce9a85a1a
commit 68707ffc74
5 changed files with 31 additions and 12 deletions
+5
View File
@@ -286,6 +286,11 @@ impl minidumper::ServerHandler for CrashServer {
}
pub fn panic_hook(info: &PanicHookInfo) {
// Don't handle a panic on threads that are not relevant to the main execution.
if extension_host::wasm_host::IS_WASM_THREAD.with(|v| v.load(Ordering::Acquire)) {
return;
}
let message = info
.payload()
.downcast_ref::<&str>()