diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-23 22:53:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-23 23:27:56 -0300 |
| commit | 263b7d2e24f5bdad6a6a62b4a13bc74b8be68cb3 (patch) | |
| tree | f6f288c54222bd8b525a00a08ac6a3527ff17597 /test/behaviour | |
| parent | dde58f770995dcbc929708048a6e0f390c70f8af (diff) | |
| download | pardes-263b7d2e24f5bdad6a6a62b4a13bc74b8be68cb3.tar.gz pardes-263b7d2e24f5bdad6a6a62b4a13bc74b8be68cb3.zip | |
walk: a length past what its buffer holds is refused where a tape, a dump or an image is decoded, its field named, never walked: merge65's core-test crashed in core/fuzz.zig's own dump fuzz (`index out of bounds: index 4503599627370496, len 64` at core/Text.zig:130, `Text.deinit` slicing `ed_redo[0..ed_redo_len]`, from views.zig `freeView`): a damaged dump was loaded with a length past its buffer, and the core's own deinit panicked (a digest, a copy and every use slice the same way); the layer's new fields moved the dump's layout so the fuzz's seeds reach it now, but the fault is the decoders': each read a `replica.len` pair's length as just a number. THE RULE, ONCE, for every pair of every type (the comptime walk lists them: `T.replica.len`, what the digest's `hash`, `fieldDigests`, the dump writer and rollback.zig already go by): `pastHeld` (the first length of a value past what its buffer holds: a slice's its own length, a fixed array's how many were read back, a dump writing one only as far as its length said, else whole), called where a struct's fields are decoded: `decode` (the tape: BadTape), `Loader.fields` (the byte dump, both of its paths: `heldTo`, BadDump) and `Get.fields` (the image: BadDump), the count read kept by each reader's `elements`/`listInto` (`filled`); the refusal's words name the field (`Text.ed_redo_len says N, past the 64 its buffer holds: refused`) and reach the user: `walk.load` and dump.zig `loadKnowing`/`loadImage` hand a refusal's notes out as they hand out a load's, and replica.zig `fromDump` says them (`the session's dump would not load: BadDump: <field> says ...`; `Replica.made` copies them out of the epoch); TESTS FIRST, each failing with the check out (run: the walk test loads `ring_len = 200`, the replica test panics `index out of bounds: index 7, len 1`): walk.zig "a length past what its buffer holds is refused where it is read back (a tape, a dump, an image), its field named, never walked" (a ring a length cuts and a room a length cuts, each through `encode`/`decode`, `save`/`load` with its length byte set past the array and past what the dump held, and `Put`/`Get`), replica.zig "a join's dump whose length says more than its buffer holds is refused, the field named, never loaded" (a column tag's `nsel` set to 7 in a byte dump's bytes, `fromDump`'s words); the fuzz as merged passes on it; the user's case: a Restore, an Upgrade or a join of a damaged dump is refused in words, the session going on (it ended at the first deinit or digest)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/behaviour')
0 files changed, 0 insertions, 0 deletions
