23 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
7665efc3a1 fuzz: new stream corpus from 2 hour run 2026-03-01 20:19:44 -08:00
Mitchell Hashimoto
43ec4ace47 fuzz: add replay-crashes.nu to help find crash repros 2026-03-01 20:08:17 -08:00
Mitchell Hashimoto
8cebcaa468 fuzz: stream cmin 2026-03-01 15:00:13 -08:00
Mitchell Hashimoto
dce2326c4c fix up gitattributes 2026-03-01 14:55:07 -08:00
Mitchell Hashimoto
1c65611446 prettier should ignore various fuzz files 2026-03-01 14:55:07 -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
f43874a168 fuzz: update corpus 2026-03-01 09:20:47 -08:00
Mitchell Hashimoto
7bc44e77d0 shellcheck 2026-03-01 06:54:06 -08:00
Mitchell Hashimoto
e8f861f561 fuzz: replace : with _ for Windows 2026-03-01 06:47:01 -08:00
Mitchell Hashimoto
346248251e typos 2026-02-28 21:14:52 -08:00
Mitchell Hashimoto
2bd09523c8 pkg/afl++: use usize for len 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
eb7d28d180 Corpus management update 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
1d9f080309 test/fuzz-libghostty: add README 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
afabbaf012 pkg/afl++: extract runner 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
2a340536a6 test/fuzz-libghostty: add zig build run 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
673dd474f8 test/fuzz-libghostty: gitignore and initial corpus 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