[M3devel] GC algorithm

Dragiša Durić dragisha at m3w.org
Fri May 4 22:37:19 CEST 2012


I am not very fluent with RTCollector source, but it looks to me there is at least one possible race condition situation possible.

RTHooks.CheckStoreTraced() explicitly marks object & its page dirty/not-clean. Everything with heap locked. But - next thing is - heaps is unlocked and this method returns. What if collector from other thread "hijacks" heap right at end of CheckStoreTraced()/well before mutator changes some reference field in object? 

Similar situaction is with "read barrier" in CheckLoadTraceRef(). Or at least it looks like one to me :).

dd




More information about the M3devel mailing list