You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plain interpreted tight recursion can still hit --max-memory before the runtime reclaims unreachable values. PR #497 now narrows its scope to making manual Goccia.gc() safe during active interpreter/bytecode execution, but it does not solve this original memory-pressure case.
The interpreter should have a safe way to reclaim unreachable temporaries/completed frames in tight function loops before throwing for memory pressure. The script should either complete under this limit or run a safe collection before deciding the heap is genuinely still over MaxBytes.
Immediate non-escaped call-scope freeing alone is not enough for Fibonacci; transient numeric values still accumulate.
Trying to collect directly from TGocciaValue.AfterConstruction when MaxBytes is exceeded is unsafe with the current interpreter, because expression temporaries are not comprehensively rooted.
A safer fix likely needs an interpreter safe-point / temporary-root model so memory-pressure collection can run only when current expression temporaries, call frames, return values, and host temps are visible to the marker.
Problem
Plain interpreted tight recursion can still hit
--max-memorybefore the runtime reclaims unreachable values. PR #497 now narrows its scope to making manualGoccia.gc()safe during active interpreter/bytecode execution, but it does not solve this original memory-pressure case.Reproduction
Current result
On
t3code/gc-loop-reclaimatb8b8d9b6, after rebuilding the loader, this exits withRangeError:Observed GC data from the JSON envelope:
Expected behavior
The interpreter should have a safe way to reclaim unreachable temporaries/completed frames in tight function loops before throwing for memory pressure. The script should either complete under this limit or run a safe collection before deciding the heap is genuinely still over
MaxBytes.Findings from PR #497 investigation
Goccia.gcsafe during active execution #497 restored TestRunner performance while preserving safe manual GC from active interpreter/bytecode execution.TGocciaValue.AfterConstructionwhenMaxBytesis exceeded is unsafe with the current interpreter, because expression temporaries are not comprehensively rooted.Related
Goccia.gcsafe during active execution #497.