1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp Tue Apr 01 07:46:51 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp Tue Aug 19 12:39:06 2014 +0200 1.3 @@ -46,26 +46,28 @@ 1.4 template <class T> 1.5 inline void G1RemSet::par_write_ref(HeapRegion* from, T* p, int tid) { 1.6 oop obj = oopDesc::load_decode_heap_oop(p); 1.7 + if (obj == NULL) { 1.8 + return; 1.9 + } 1.10 + 1.11 #ifdef ASSERT 1.12 // can't do because of races 1.13 // assert(obj == NULL || obj->is_oop(), "expected an oop"); 1.14 1.15 // Do the safe subset of is_oop 1.16 - if (obj != NULL) { 1.17 #ifdef CHECK_UNHANDLED_OOPS 1.18 - oopDesc* o = obj.obj(); 1.19 + oopDesc* o = obj.obj(); 1.20 #else 1.21 - oopDesc* o = obj; 1.22 + oopDesc* o = obj; 1.23 #endif // CHECK_UNHANDLED_OOPS 1.24 - assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned"); 1.25 - assert(Universe::heap()->is_in_reserved(obj), "must be in heap"); 1.26 - } 1.27 + assert((intptr_t)o % MinObjAlignmentInBytes == 0, "not oop aligned"); 1.28 + assert(Universe::heap()->is_in_reserved(obj), "must be in heap"); 1.29 #endif // ASSERT 1.30 1.31 assert(from == NULL || from->is_in_reserved(p), "p is not in from"); 1.32 1.33 HeapRegion* to = _g1->heap_region_containing(obj); 1.34 - if (to != NULL && from != to) { 1.35 + if (from != to) { 1.36 assert(to->rem_set() != NULL, "Need per-region 'into' remsets."); 1.37 to->rem_set()->add_reference(p, tid); 1.38 }