diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 347a9c433d0f84dc81120985a812e8102c32f5a4..1a34d67f9dbb3fac0e1d527e978a54fd65c9a0dd 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -340,6 +340,7 @@ pub fn panicImpl(trace: ?*const std.builtin.StackTrace, first_trace_addr: ?usize if (panicking.fetchSub(1, .SeqCst) != 1) { // Another thread is panicking, wait for the last one to finish // and call abort() + if (builtin.single_threaded) unreachable; // Sleep forever without hammering the CPU var futex = std.atomic.Atomic(u32).init(0);