We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc61484 commit 2fe0bf6Copy full SHA for 2fe0bf6
src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp
@@ -41,8 +41,14 @@
41
#include "utilities/bitMap.inline.hpp"
42
43
inline bool G1CMIsAliveClosure::do_object_b(oop obj) {
44
- HeapRegion* hr = _g1h->heap_region_containing(cast_from_oop<HeapWord*>(obj));
+ // Check whether the passed in object is null. During discovery the referent
45
+ // may be cleared between the initial check and being passed in here.
46
+ if (obj == NULL) {
47
+ // Return true to avoid discovery when the referent is NULL.
48
+ return true;
49
+ }
50
51
+ HeapRegion* hr = _g1h->heap_region_containing(cast_from_oop<HeapWord*>(obj));
52
// All objects allocated since the start of marking are considered live.
53
if (hr->obj_allocated_since_next_marking(obj)) {
54
return true;
0 commit comments