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
One bug class, three instances in one day. Process-global state keyed by (or holding) a heap address outlives the thread whose arena owned that address. After the thread exits, Arena::drop frees its blocks, and another thread's arena can reuse the same addresses. The stale entry then describes a different object.
fix(runtime): a thread exit forgets its typed arrays in the global kind cache (#11463) #11470:PERRY_TA_KIND_CACHE / INLINE_OWNING_U32_CACHE (process-global, keyed by address) kept "this address is a typed array" after the owning thread exited, so a Promise at the reused address was misread as a Uint8Array (streams::pipe flake). Fixed by invalidate_kind_caches_in_ranges in Arena::drop.
Gap.scripts/gc_runtime_root_holders.py enumerates statics that can hold heap pointers as GC roots. It does not cover process-global lookup caches keyed by heap addresses, which aren't roots but are just as stale after arena reuse. Each instance so far was found by chasing a flake.
Ask.
Audit every process-global cache or table in perry-runtime and perry-stdlib keyed by or storing a heap address, and make each one per-thread or invalidated in Arena::drop.
Add a gate, like the root-holder inventory, that requires every such static to declare its thread-exit story, so the next one fails CI instead of flaking.
Activity
runtime: thread-exit range-hook registry for address-keyed globals (#…
lint: thread-exit custody gate for address-keyed process globals (#11471
runtime/stdlib: release address-keyed process globals at thread exit (#…
perf(size): keep feature-module thread-exit hooks and the nm symboliz…
perf(size): keep feature-module thread-exit hooks and the nm symboliz…
perf(size): keep feature-module thread-exit hooks and the nm symboliz…
perf(size): keep feature-module thread-exit hooks and the nm symboliz…
perf(size): keep feature-module thread-exit hooks and the nm symboliz…
fix(runtime): stream subclass-init slot: no unused mut, thread-exit v…
perf: this is a parameter of every JS body; the implicit-this cell is…
perf: function objects point to a static JsFunctionInfo; delete the c…
fix(zlib): a zlib stream belongs to the agent that made it