23 commits since v0.8.0. 870 tests passing.
v0.8.1 is a patch release that closes out the remaining bug tracker entries
(#300–#346) and brings the codebase into full Zig 0.16 compliance. The
highest-impact fixes are performance (O(n²) → O(1) hot-path caches), memory
safety (UAF, double-free, leaks eliminated), and error handling (91 silent
catch {} suppressions replaced with proper logging).
The v0.8.0 performance audit (#300–#310) identified 11 bottlenecks in the render and event loops. All have been resolved with targeted caching:
isPaneValid (#305) — added valid: bool to Pane; now an O(1)
pointer check instead of an O(N·M·P) tree walk on every PTY event.anyDisplayClientBehind (#303) — added behind_count: u32 to
Server; O(1) counter instead of traversing display_clients on every
loop iteration. Backpressure leak fixed: disconnected clients now clear
the counter on all four removal paths.last_foreground_name cached on
Window; getForegroundProcessName() syscall skipped when the cached
name matches. 1-second rate limit prevents stale reads.border_format_cached /
border_format_gen on Pane; format is expanded once and reused until
pane-border-format option changes. Allocator mismatch corrected
(now uses pane’s grid allocator).DisplayClient cache; skipped entirely
when the server is not dirty and the client width is unchanged.DisplayClient.deinit.behind_count leak on client disconnect — all four paths now
saturating-decrement the counter.cmdSetOption now bumps session.border_format_gen.last_foreground_name aliased win.name,
making the skip check always true; replaced with timestamp-based
rate limit.| Bug | Fix |
|---|---|
| #312 | processInput UAF when an action destroys the active pane or session — added guard |
| #313 | Window title callback called allocator.free on a Session arena pointer |
| #314 | Border format strings allocated with wrong allocator (pane grid vs gpa) |
| #324 | cmdRenameWindow leaked window name into session arena |
| #338 | Status line string duplicated per frame when cache hit — removed redundant allocation |
| #315/#320/#323 | Command/layout desync on pane removal — layout tree and pane list kept in sync |
| #316/#317 | Sixel refcount leaks on vertical screen shrink and history eviction |
| #318 | Layout split failure left parent pane dimensions un-restored |
| #319 | Darwin errno enum check; window name stack pointer fixup; invalid free |
| #321 | Uncapped loop in CSI ‘Z’ handler — CPU exhaustion DoS |
| #322 | Synchronous blocking write in server response dispatch |
set -u directive was silently ignored in config parsermapCommandToAction could match wrong commandWindow.panes array and layout treeprocessInput when action destroys active panecmdBreakPane / cmdJoinPaneerrno enum check; window name stack pointer fixupset -u parser; code duplication in key binding flags and window index resolutioninline for| Bug | Fix |
|---|---|
| #339 | 91 instances of catch {} replaced with catch |err| std.log.warn(...) across 9 files |
| #343 | detectNested() in main.zig now uses init.environ_map instead of std.c.getenv |
| #344 | main() signature changed from void to !void (Zig 0.16 rule #1) |
| #345 | std.process.Args.Iterator replaced with init.minimal.args.toSlice(arena) — eliminates N heap allocations per invocation |
| #341 | initCapacity() calls updated to = .empty + ensureTotalCapacity for consistency |
Three items initially flagged as violations (#340, #342, #346) were verified against the actual Zig 0.16 std lib source and confirmed as false positives:
std.StringHashMap / std.AutoHashMap managed types still exist and are not deprecatedstd.ArrayList.toOwnedSlice() still exists in both managed and unmanaged variantsstd.Io import
exists in the entire tree) — the io capability pattern does not apply| Metric | v0.8.0 | v0.8.1 |
|---|---|---|
| Total bugs | 300 | 346 |
| Fixed | 286 | 327 |
| False positive | 9 | 17 |
| Intentional | 1 | 1 |
| Open | 0 | 0 |
All 346 bugs are now resolved.
| Metric | v0.8.0 | v0.8.1 |
|---|---|---|
| Passing tests | 802 | 870 |
| New regression tests | — | 68 |