fence (25.1c): the census reads the heap outside Ludic's blocks; blocks counted at malloc's own size

The census's native line is malloc's live bytes over every zone since judging began less what
Ludic's tracked blocks kept - the libraries' and drivers' growth, read before the census file is
opened. A tracked block counts malloc_size(), not the size asked for, so kept is what the heap pays
and the residual carries no rounding. @malloc_zone_statistics is declared once, by the fence or by
Os.heap_bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 15:38:13 +03:00
parent a8d54e9878
commit 691964877b
7 changed files with 47519 additions and 47279 deletions

View file

@ -1,6 +1,6 @@
# alloc_fence_leak.ludic - frame 50 keeps one record in a list that outlives it. The fence fails
# the run there (exit 86) and names this file's `new Box` line; under R3D_ALLOC_FENCE=count it
# runs on and prints `kept 72 bad 1` (the record and the list's first growth, one frame).
# runs on and prints `kept 80 bad 1` (the record and the list's growth, at malloc's own sizes, in one frame).
program AllocFenceLeak {
property Box { a: int = 0, b: int = 0 }
entry {