summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 20:39:14 -0300
committerGabriel Schneider <[email protected]>2026-11-24 20:39:14 -0300
commite6269fc4f53e0088b77ea5244ee34f5a39867268 (patch)
treead85417d59f6c2062869f9b828dd3e322daa89c6 /runtime
parentcfe32e52db251f3102fd724fc1121d2e7819d0fd (diff)
downloadpardes-e6269fc4f53e0088b77ea5244ee34f5a39867268.tar.gz
pardes-e6269fc4f53e0088b77ea5244ee34f5a39867268.zip
dump: a load frees what it read after the core (its mounts, its theme, the other views' shares) as the things it made, once each, never by hand: a damaged dump whose theme is a reference to a slice the loaded core holds had it freed by `defer gpa.free(theme)` and again by the rollback when a later read failed (and, had the load gone on, the core keeping a freed slice); found by the 40,000-seed fuzz this line's dump layout asks for: RUN FIRST: fuzz.zig "a dump and an image cut ..." at 40,000 join seeds over a session with a reader's walk in it, join seed 19224: `panic: double free` (the first free dump.zig:421 `defer gpa.free(theme)`, the second the errdefer's `l.rollback()`, dump.zig:401); THE CAUSE: walk.Load.ref hands back a slice made before (`shared`), which for the trailing reads is the core's, and loadKnowing freed those reads by hand; THE FIX: one defer frees `l.shared.items[read..]` (what was made after the core) and drops it from the rollback, the views' shares the same; no user could hit it but with a damaged or hostile dump (a join's stream, a Restore file); TEST FIRST: the fuzz's session keeps a reader's walk and checks join seed 19224 by name (fails before: double free); the fuzz at 40,000 join and 1,779 image seeds green in 145 s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'runtime')
0 files changed, 0 insertions, 0 deletions