diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 22:09:09 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 22:14:12 -0300 |
| commit | 8c083912002f5cfdf268ed45ec217fbd8bde41d0 (patch) | |
| tree | dd740093970788f6a1336ea49b66f5ee1b669924 /core/Layer.zig | |
| parent | c1e71f6734fc0f74f1e059dda3e2841e8a69d0c4 (diff) | |
| download | pardes-8c083912002f5cfdf268ed45ec217fbd8bde41d0.tar.gz pardes-8c083912002f5cfdf268ed45ec217fbd8bde41d0.zip | |
TagState, Core: a loaded tag state is held to what it indexes, and a told focus to the pane slots (fixes found by item 4's dump fuzz, on line A2): RUN: the 40,000-seed dump fuzz (core/fuzz.zig "a dump and an image cut...", its counts raised to 40,000 join and 1,779 image seeds and its session put in Help, `SPC t w` then `SPC ? hel`, a temporary edit put back) panicked twice before this: `index out of bounds: index 65163, len 64` at TagState.zig helpLeaf (`p.kinds.words[at - flat.len]`), from Band.helpSteps, draw.joinBand, render of a damaged dump's view, and then `index 524288, len 64` at Core.zig reportFocus (`p.panes[old.id]`); THE CAUSE: a dump gives View.tag_state as it was written, and nothing held its indexes after a load: a Help hit past the tree and the registry's words, its rows' cursor past its hits, the field's caret past its text, describe-key's found leaf with no keys; and View.focus_told (main's, unchanged since e9f3712c) is read back as a pane slot unchecked (the seeds land elsewhere since the tag state joined the dump: wire 36); THE FIX: TagState.loaded, from dump.zig afterLoad (both loads): a tag state that does not hold is at rest, its memory of leaves kept; reportFocus asks a slot past MAX_PANES for no pane; a user could hit them only with a damaged dump (a cut file, a flipped byte), and the session panicked on its first frame or key; NOT FIXED: the third run of the fuzz panicked with `double free` in walk.zig slice (walk.zig:1847, from value:1780, oneField:1988, dump.zig:422 loadKnowing: the join road): a damaged back-reference (l.ref) lets two fields share one allocation, both freed on the error path: the loader's, main's; TEST: TagState.zig "a dump's tag state that indexes past what it names is at rest when loaded, and its frame draws"
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/Layer.zig')
0 files changed, 0 insertions, 0 deletions
