mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix order of operations regression in referenceTargetUnreachable
We need to dereference the GcJreference** before we change what it points to. The code was mistakenly reordered in the recent type refactoring.
This commit is contained in:
parent
84ad3c2392
commit
4c8f3933f5
@ -409,11 +409,11 @@ void referenceTargetUnreachable(Thread* t, Heap::Visitor* v, GcJreference** p)
|
||||
(*p)->target() = 0;
|
||||
|
||||
if (objectClass(t, *p) == type(t, GcCleaner::Type)) {
|
||||
*p = cast<GcJreference>(t, (*p)->vmNext());
|
||||
|
||||
// In openjdk, sun/misc/Cleaner extends PhantomReference
|
||||
GcCleaner* cleaner = (*p)->as<GcCleaner>(t);
|
||||
|
||||
*p = cast<GcJreference>(t, (*p)->vmNext());
|
||||
|
||||
cleaner->setQueueNext(t, roots(t)->objectsToClean());
|
||||
roots(t)->setObjectsToClean(t, cleaner);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user