Open qinsoon opened 2 months ago
There are two issues here:
clear_weak_refs
in mmtk-gc.c
.The simple solution is to pin both: the weak ref, and the value they refer to. See https://github.com/mmtk/julia/pull/64/commits/51ba2a602e798e82f48c5d9004520c3fe68645b3.
There are many such instances in ART and the solution they have/I have co-opted is to visit these locations at the end of the transitive closure but before the "release" and fixup all pointers since we have complete information at that time. I use the mmtk_get_forwarded_object
API to get the new address. The problem in Julia, of course, might be that it's unclear which locations are actually storing pointers.
Saw the following error in https://github.com/mmtk/mmtk-julia/pull/175.