diff options
| author | eunhhu <[email protected]> | 2026-09-30 05:37:11 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 05:37:11 +0100 |
| commit | b0bec448d30f198dc4817d71fc8c72654907a3a9 (patch) | |
| tree | 2601e5c98761fe4ec7cea6db51582417551c31e1 /link/crypto.h | |
| parent | 9aa123ec5e8827a6101fa7c6db139397b39e04f2 (diff) | |
| download | pure-b0bec448d30f198dc4817d71fc8c72654907a3a9.tar.gz pure-b0bec448d30f198dc4817d71fc8c72654907a3a9.zip | |
Balance the snapshot register's count, and free the runtime lists in order
Under AddressSanitizer with leaks counted, the module checks lost 672
KB in 10,185 allocations. Two causes, both from the snapshot rework
(d1e8f38):
- A snapshot's register counted its snapshots with ++ under its spin,
but a snapshot's last release took one off atomically outside it. A
release on a reader's thread racing the owner's next snapshot could
lose either change: the register then outlived every snapshot (the
leak seen), or went while one still used it. The count is atomic now.
- pure_app_stop handed what its lists let go to the newest snapshot (or
freed it) and only then freed the outbox and the numbers heard, whose
shared nodes and texts went to that hand-over's list again, for good.
They are freed with the other lists now.
make check builds the module checks a second time under AddressSanitizer
and UndefinedBehaviorSanitizer (build/test-module-sanitized, 25 s) and
fails on a leak. Before d1e8f38 the same build stops at a
heap-use-after-free in retire; now it is clean.
Diffstat (limited to 'link/crypto.h')
0 files changed, 0 insertions, 0 deletions
