summaryrefslogtreecommitdiff
path: root/dev/macos/Sources/FileWatcher.swift
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 04:25:32 -0300
committerGabriel Schneider <[email protected]>2026-11-23 07:28:22 -0300
commit100fe567edc8be7bea9b36ae7fbf20cc66d55164 (patch)
tree97595f87732de223559c56002f526d825d926eaa /dev/macos/Sources/FileWatcher.swift
parent396247178d20678a36e9e1782c2a457eeb1916de (diff)
downloadpardes-100fe567edc8be7bea9b36ae7fbf20cc66d55164.tar.gz
pardes-100fe567edc8be7bea9b36ae7fbf20cc66d55164.zip
replica: a client let go takes its notes out of the batch the session is taking, not only out of the next: its writer's `.joined` (its join written whole) could come after its reader's `.gone` in one boundary's batch (the writer descheduled between its last write and its post), `leave` -> `letGo` freed the peer, and the `.joined` after it read `w.peer.gen` off freed memory and, equal by chance, `released` someone else's pins (round 1 found it on the base; a user could hit it with a client that ends as its join's last bytes are written: a session crash or a heap overwrite in a release build); the failing test first: "a client's end and its writer's note after it, taken in one batch, let the client go once: nothing reads it freed" (the session's allocations a page each so a let-go peer is unmapped): on the base a segmentation fault at core/replica.zig:1978 in `boundary` (`.joined => |w| if (w.gen == w.peer.gen)`); the fix: `boundary` keeps its place in the batch (`Peers.taking`) and `letGo` takes the peer's notes out of the inbox and out of the batch after that place alike (`Peers.dropNotes`, the inbox's filter it had made one function); core-test 931/1095 (164 skipped: the merge's 930/1094 and this test), shell-test 1137/1140 (3 skipped); the whole gate g1 on this tree green (the report pardes-link-2.md)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/macos/Sources/FileWatcher.swift')
0 files changed, 0 insertions, 0 deletions