diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 03:06:50 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 03:18:54 -0300 |
| commit | bdbe524d8ea6b08689b2eec77d2a2db316ae32d2 (patch) | |
| tree | b9abed7580d05fdddb54ecb6dd546a792b5a20a6 /runtime/daemon.zig | |
| parent | 3845a3eb8dd009ac1f2d184e6d15439e27065b66 (diff) | |
| download | pardes-bdbe524d8ea6b08689b2eec77d2a2db316ae32d2.tar.gz pardes-bdbe524d8ea6b08689b2eec77d2a2db316ae32d2.zip | |
walk: a struct read in place holds a length read back without its array to what the array held before the read, so a damaged dump whose messages' `live_len` came back without their `live` is refused, not walked over undefined messages (walk UI M4 item 2, the fuzz panic G2's gate met: join seed 4135 on G2's tree, 6356 on this one; G2's run without this line's session lines met it at 33733): RUN: the dump fuzz at join seed 6356 panicked in its digest (tape.digestOf after the load), `index out of bounds: index 43690, len 96` at walk.zig hash: Messages.live[0]'s `src` (a Kind.Buf(96)) said 0xAAAA bytes; the load said live_len 1 and had not read `live`; THE CAUSE: a load reads the core in place (dump.zig loadKnowing, walk.Loader.into: `fields(Pardes, ..., existing = true)`, and each struct field under it in place too), and Loader.fields (walk.zig, the `held` it begins with) and Get.fields (the image's) took an in-place struct's arrays as holding ALL their slots (`maxInt`) until they were read, so pastHeld refused no length whose array the dump did not carry: a damaged dump whose Messages kept `live_len` and lost `live` (a damaged name, or a kind that changed, "left as it was") left `live_len` 1 over the fresh core's `live: [max_live]Said = undefined` (0xAA in Debug, any bytes in a release build), and the digest, the notice row, the marks and every reader of a live message read past it; THE FIX (heldNow, both readers): an in-place array holds, before the read, as far as its length said then (heldOf: a fresh core's none), and a read array as far as it was read, as before; so the length read back alone is refused when it says more (pastHeld's note: `live_len` says 1, past the 0 its buffer holds), and a length the array held before stands; a same-build dump reads every field and is not changed by it; a user restoring or joining from a damaged dump could have hit it (a release build reads that garbage as messages); TEST FIRST: walk.zig "a struct read in place holds a length read back without its array to what the array held: past it, the dump is refused" (fails before: no error), fuzz.zig's join seed 6356 pinned beside 19224 and 31554 (panics before); the fuzz at 40,000 join and 1,779 image seeds over this line's session (kept picker, recipe, search word, Help): pass (3 min 17 s); core-test 1062/1232 (170 skipped), shell-test 1279/1282 (3 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'runtime/daemon.zig')
0 files changed, 0 insertions, 0 deletions
