diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-30 21:04:02 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-30 21:28:49 -0300 |
| commit | e6a114eed043dd1ca50be1cab912662fa9150fda (patch) | |
| tree | 9a141f1f652807031f98f5f7a943cc0003db812b /src/dump.zig | |
| parent | 4de480393606fa1f680a4fe84a2507679016efc1 (diff) | |
| download | pardes-e6a114eed043dd1ca50be1cab912662fa9150fda.tar.gz pardes-e6a114eed043dd1ca50be1cab912662fa9150fda.zip | |
dump: a closed terminal brought back on a screen-state replica gets its emulator on the C heap, as terminal.create makes one (terminal.emulatorGpa): loadPane named no `.terminal` allocator, so its emulator was the rollback epoch's, and its screen replica's blobs, made with State.gpa, were freed with the C heap's behind the epoch at a client's end and again by it (H21: `double free or corruption` in Epoch.deinit at a hangup, `free(): invalid pointer` at a rejoin), and a rollback freed what a delta under a held copy made of them
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/dump.zig')
| -rw-r--r-- | src/dump.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dump.zig b/src/dump.zig index c64f83c4..5f5f5870 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -539,7 +539,7 @@ pub fn savePane(gpa: std.mem.Allocator, pane: *pardes.panes.Pane, slim: bool) ![ pub fn loadPane(p: *Pardes, id: usize, bytes: []const u8) !*pardes.panes.Pane { var l = try walk.Load(&.{pardes.panes.Pane}).init(p.gpa, bytes); defer l.deinit(); - l.allocs = .{ .image = p.image_gpa, .pdf = p.pdf_gpa }; + l.allocs = .{ .image = p.image_gpa, .pdf = p.pdf_gpa, .terminal = pardes.panes.terminal.emulatorGpa(p.gpa) }; const pane = try p.gpa.create(pardes.panes.Pane); errdefer { l.rollback(); |
