escape (fix): kept memory is HEAP, so what is pushed through an alias of it is kept
render3d's stream_new holds its pool through a local (`let live = s.chunks; push(live, new Chunk)`): the flow edge from s.chunks to live carried ESC to nothing, the Chunk records were LOCAL, and the arena reset them under the stream - the row and horse scenarios' crash at 0xdddd... in fn_stream_update. An ESC class is now HEAP too, so every alias of kept memory is, and a value stored through it is kept. Bidirectional alias edges were tried first and over-kept through returns (el_place, rim). - examples/lang/arena_alias.ludic: the stream_new shape; poisoned it read 3 3000, now 3 1518 - examples/modules/alloc_ok_private.ludic: @alloc_ok on a module's private function and on a statement in its private generic, declared at run time (it already passes: a guard) - the game: frame_allocs, frame_keeps, owned_leaks 0; the lab builds under `arena strict`; the row scenario poisoned (R3D_ARENA_CHECK=1, 2400 frames) runs clean, bad 0 kept 0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4d3ecfb72c
commit
de6d78bef5
7 changed files with 45874 additions and 45571 deletions
|
|
@ -527,6 +527,13 @@ function es_solve() -> void {
|
|||
}
|
||||
i += 1
|
||||
}
|
||||
# kept memory outlives the frame: an ESC class is HEAP too, so every alias of it (let x = y,
|
||||
# a load, a call's result) is, and what is stored through the alias is kept
|
||||
i = 0
|
||||
while i < len(g_es_flag) {
|
||||
if (g_es_flag[i] & ES_ESC) != 0 and (g_es_flag[i] & ES_HEAP) == 0 { g_es_flag[i] = g_es_flag[i] | ES_HEAP; changed = true }
|
||||
i += 1
|
||||
}
|
||||
i = 0
|
||||
while i < len(g_es_sv) {
|
||||
let v = g_es_sv[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue