Community
Participate
Working Groups
Build Identifier: The code in the DTFJIndexBuilder that calculates the gcroots when using a PHD (heapdump which doesn't contain root information) it assumes that if nothing points to an object it is a gc root. However, the current code assumes that if the object points to itself it is pointed to by something and thus cannot be a gc root. To fix it a simple "if points to itself don't assume this is not a root' needs to be added to addRefs() Reproducible: Always
Created attachment 191445 [details] Patch to stop obj pointing to itself not being gcroot elligible
Thanks - that's a useful point. It makes no difference to the two test case dumps /org.eclipse.mat.tests/dumps/heapdump.20100112.141124.11580.0002.phd /org.eclipse.mat.tests/dumps/heapdump.20100209.165721.4484.phd but might be useful for other dumps. For the record, please could you confirm for the patch: 1.that you wrote 100% of the code 2.that you are authorized to contribute it 3.that is is submitted under the EPL. This is needed so we can use the patch.
> For the record, please could you confirm for the patch: > 1.that you wrote 100% of the code Yes > 2.that you are authorized to contribute it Yes > 3.that is is submitted under the EPL. Yes
I'll also make the corresponding change to GarbageCleaner.java which also calculates extra GC roots for otherwise unreachable objects.
I've also improved the selection of extra GC roots in GarbageCleaner for keep_unreachable_objects.