From d678a63e0abf2ba8994225a9f0fd0047fee4025a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 14:37:21 -0300 Subject: Every catch unreachable, orelse unreachable and syscall assert outside tests is a real refusal or says why it cannot fire A sweep for round 23's crash: a run's answer (pty/run) was bufPrint'd into 48 bytes with catch unreachable, so a foreground program's long name (macOS gives up to 32 bytes) panicked; it now cuts at the room, keeping its newline, in 96 bytes. The rest were numbers into buffers sized for them, a braille codepoint, pthread calls on the queue's own mutex, and pdf_view's resolved outline entries: each now carries a one-line comment saying why it cannot fire. Co-Authored-By: Claude Opus 5.5 --- src/builtins.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 9a49df16..8788e65f 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -1827,6 +1827,7 @@ const Board = struct { writeWord(addr, value); const back = readWord(addr); var buf: [96]u8 = undefined; + // unreachable below: three 8-digit hex words and 18 bytes fit 96 p.setMessage(id, std.fmt.bufPrint( &buf, "{x:0>8}: wrote {x:0>8}, reads {x:0>8}", @@ -1849,6 +1850,7 @@ const Board = struct { if (!toggle(p.host.ctx, pin, &was, &now)) return Error.BadPin; var buf: [48]u8 = undefined; + // unreachable: three small numbers and 10 bytes fit 48 p.setMessage(id, std.fmt.bufPrint(&buf, "GPIO {d}: {d}->{d}", .{ pin, was, now }) catch unreachable); } -- cgit v1.3