Skip to content

GC relocation: rewrite every runtime root, edge, weak, and finalization reference #335

Description

@chrisbbreuer

Parent: #144\nDepends on: #333, #334\nRoadmap: #134\n\nMake compaction precise across the complete runtime graph rather than only collector-owned cells.\n\n## Scope\n\n- Rewrite all Value and typed-pointer edges in objects, environments, functions, promises, generators, modules, timers, jobs, workers, threads, debugger/inspector state, native-private records, and WebAssembly stores.\n- Rewrite interpreter stacks/frames, escaped frames, temporary roots, concurrent snapshots, C API protection tables, Objective-C managed references, and Bun/Home ABI containers.\n- Preserve WeakMap/WeakSet ephemeron reachability, WeakRef identity, FinalizationRegistry ordering, and exactly-once external-owner finalization.\n- Repair interior/reference projections or pin them explicitly with a checked invariant.\n- Exercise cyclic, cross-realm, cross-thread, and host-reentrant graphs.\n\n## Acceptance\n\n- [ ] Every #333 inventory entry is implemented or explicitly pinned with a test.\n- [ ] Strong/weak/ephemeron/finalization semantics remain exact across repeated moves.\n- [ ] C API, Objective-C, Bun/Home ABI, inspector, Worker/Thread, Promise/module, timer, and Wasm witnesses pass.\n- [ ] No stale old-space address remains reachable after a verified compaction.\n- [ ] Fault-injection, teardown, leak, and focused TSan gates pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions