| ... | ... | @@ -532,6 +532,10 @@ pub fn defaultPanic(msg: []const u8, first_trace_addr: ?usize) noreturn { |
| 532 | 532 | else => {}, |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | // Don't try to cancel during a panic. No need to re-enable cancelation, |
| 536 | // because the panic handler doesn't return. |
| 537 | _ = std.Options.debug_io.swapCancelProtection(.blocked); |
| 538 | |
| 535 | 539 | if (enable_segfault_handler) { |
| 536 | 540 | // If a segfault happens while panicking, we want it to actually segfault, not trigger |
| 537 | 541 | // the handler. |
| ... | ... | @@ -1533,6 +1537,10 @@ fn handleSegfault(addr: ?usize, name: []const u8, opt_ctx: ?CpuContextPtr) noret |
| 1533 | 1537 | } |
| 1534 | 1538 | |
| 1535 | 1539 | pub fn defaultHandleSegfault(addr: ?usize, name: []const u8, opt_ctx: ?CpuContextPtr) noreturn { |
| 1540 | // Don't try to cancel during a segfault. No need to re-enable cancelation, |
| 1541 | // because the segfault handler doesn't return. |
| 1542 | _ = std.Options.debug_io.swapCancelProtection(.blocked); |
| 1543 | |
| 1536 | 1544 | // There is very similar logic to the following in `defaultPanic`. |
| 1537 | 1545 | switch (panic_stage) { |
| 1538 | 1546 | 0 => { |