Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8256020: Shenandoah: Don't resurrect objects during evacuation on AS_NO_KEEPALIVE #1113

Closed
wants to merge 6 commits into from
Closed
@@ -106,14 +106,15 @@ inline oop ShenandoahBarrierSet::load_reference_barrier(oop obj, T* load_addr) {
if (!HasDecorator<decorators, ON_STRONG_OOP_REF>::value && obj != NULL &&
_heap->is_concurrent_weak_root_in_progress() &&
!_heap->marking_context()->is_marked(obj)) {
Thread* thr = Thread::current();
if (thr->is_Java_thread()) {
return NULL;
} else {
// This path is sometimes (rarely) taken by GC threads.
// See e.g.: https://bugs.openjdk.java.net/browse/JDK-8237874
return obj;
}
return NULL;
}

// Prevent resurrection of unreachable objects that are visited during
// concurrent class-unloading.
if (HasDecorator<decorators, AS_NO_KEEPALIVE>::value && obj != NULL &&
_heap->is_evacuation_in_progress() &&
!_heap->marking_context()->is_marked(obj)) {
return obj;
}

oop fwd = load_reference_barrier(obj);