Commit Graph

9 Commits

Author SHA1 Message Date
Mitchell Hashimoto
b9669e10c4 fuzz: update stream fuzzer to use TerminalStream
ReadonlyStream was removed from the public API. Update the stream
fuzzer to use TerminalStream, which is the type now returned by
Terminal.vtStream().
2026-03-23 14:17:10 -07:00
Mitchell Hashimoto
2044e5030f terminal: make stream processing infallible
The terminal.Stream next/nextSlice functions can now no longer fail.
All prior failure modes were fully isolated in the handler `vt`
callbacks. As such, vt callbacks are now required to not return an error
and handle their own errors somehow.

Allowing streams to be fallible before was an incorrect design. It
caused problematic scenarios like in `nextSlice` early terminating
processing due to handler errors. This should not be possible.

There is no safe way to bubble up vt errors through the stream because
if nextSlice is called and multiple errors are returned, we can't
coalesce them. We could modify that to return a partial result but its
just more work for stream that is unnecessary. The handler can do all of
this.

This work was discovered due to cleanups to prepare for more C APIs.
Less errors make C APIs easier to implement! And, it helps clean up our
Zig, too.
2026-03-13 13:56:14 -07:00
Mitchell Hashimoto
d2175d1b56 fuzz: add OSC parser fuzzer 2026-03-03 08:37:45 -08:00
Mitchell Hashimoto
33fbd73247 fuzz/stream: clean up 2026-03-01 14:55:07 -08:00
Mitchell Hashimoto
4f44879c3b Clean up how fuzzers are laid out 2026-03-01 14:55:07 -08:00
Mitchell Hashimoto
e081a4abb4 fuzz/vt-stream 2026-03-01 14:55:07 -08:00
Mitchell Hashimoto
2bd09523c8 pkg/afl++: use usize for len 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
3294621430 switch to pkg/afl++ for fuzz 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
adbb432930 test/fuzz-libghostty: basic afl++-based fuzzer for libghostty 2026-02-28 21:14:51 -08:00