File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/hotspot/share/gc/shenandoah Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -100,24 +100,27 @@ inline oop ShenandoahBarrierSet::load_reference_barrier(oop obj) {
100100
101101template <DecoratorSet decorators, class T >
102102inline oop ShenandoahBarrierSet::load_reference_barrier (oop obj, T* load_addr) {
103+ if (obj == NULL ) {
104+ return NULL ;
105+ }
103106
104107 // Prevent resurrection of unreachable phantom (i.e. weak-native) references.
105- if (HasDecorator<decorators, ON_PHANTOM_OOP_REF>::value && obj != NULL &&
108+ if (HasDecorator<decorators, ON_PHANTOM_OOP_REF>::value &&
106109 _heap->is_concurrent_weak_root_in_progress () &&
107110 !_heap->marking_context ()->is_marked (obj)) {
108111 return NULL ;
109112 }
110113
111114 // Prevent resurrection of unreachable weak references.
112115 if ((HasDecorator<decorators, ON_WEAK_OOP_REF>::value || HasDecorator<decorators, ON_UNKNOWN_OOP_REF>::value) &&
113- obj != NULL && _heap->is_concurrent_weak_root_in_progress () &&
116+ _heap->is_concurrent_weak_root_in_progress () &&
114117 !_heap->marking_context ()->is_marked_strong (obj)) {
115118 return NULL ;
116119 }
117120
118121 // Prevent resurrection of unreachable objects that are visited during
119122 // concurrent class-unloading.
120- if (HasDecorator<decorators, AS_NO_KEEPALIVE>::value && obj != NULL &&
123+ if (HasDecorator<decorators, AS_NO_KEEPALIVE>::value &&
121124 _heap->is_evacuation_in_progress () &&
122125 !_heap->marking_context ()->is_marked (obj)) {
123126 return obj;
You can’t perform that action at this time.
0 commit comments