diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 14:37:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | d678a63e0abf2ba8994225a9f0fd0047fee4025a (patch) | |
| tree | 9c1a13fe7895ec162e9ee24de2913f2375375241 /src/detached/server.zig | |
| parent | 25c847e28ae77f5c648d423d64011736f55eda4a (diff) | |
| download | pardes-d678a63e0abf2ba8994225a9f0fd0047fee4025a.tar.gz pardes-d678a63e0abf2ba8994225a9f0fd0047fee4025a.zip | |
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 <[email protected]>
Diffstat (limited to 'src/detached/server.zig')
| -rw-r--r-- | src/detached/server.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/detached/server.zig b/src/detached/server.zig index 676b5b95..b536e4a7 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -1214,6 +1214,7 @@ pub const Session = struct { fn refuseFd(_: *Session, fd: c_int, why: wire.Refusal) void { var buf: [wire.header_len + 1]u8 = undefined; + // unreachable: a refusal is a header and one byte, which buf is sized to const bytes = wire.encodeServer(&buf, .{ .refuse = why }) catch unreachable; var off: usize = 0; while (off < bytes.len) { |
