`G1BlockOffsetTablePart::forward_to_block_containing_addr` contains the following loop:
```
while (n <= addr) {
...
if (obj->klass_or_null_acquire() == NULL) {
return q;
}
...
}
```
The intention of the early-return is to stop parsing the heap if the the current obj has an invaliad klass pointer.
However, this should never occur because this method is called only for objs in old-gen, and the loop entered only for non-humongous objs.
Note: humongous objs can have null-klass and it's taken care of in `eapRegion::do_oops_on_memregion_in_humongous`.
```
while (n <= addr) {
...
if (obj->klass_or_null_acquire() == NULL) {
return q;
}
...
}
```
The intention of the early-return is to stop parsing the heap if the the current obj has an invaliad klass pointer.
However, this should never occur because this method is called only for objs in old-gen, and the loop entered only for non-humongous objs.
Note: humongous objs can have null-klass and it's taken care of in `eapRegion::do_oops_on_memregion_in_humongous`.