8346008: Fix recent NULL usage backsliding in Shenandoah

Reviewed-by: kbarrett, wkemper
This commit is contained in:
Sonia Zaldana Calles 2024-12-12 18:15:18 +00:00
parent 11cd639842
commit ff85865b75
2 changed files with 2 additions and 2 deletions

View File

@ -792,7 +792,7 @@ HeapWord* ShenandoahFreeSet::allocate_single(ShenandoahAllocRequest& req, bool&
// Free set maintains mutator and collector partitions. Normally, each allocates only from its partition,
// except in special cases when the collector steals regions from the mutator partition.
// Overwrite with non-zero (non-NULL) values only if necessary for allocation bookkeeping.
// Overwrite with non-zero (non-null) values only if necessary for allocation bookkeeping.
switch (req.type()) {
case ShenandoahAllocRequest::_alloc_tlab:

View File

@ -202,7 +202,7 @@ void ShenandoahGenerationalEvacuationTask::promote_in_place(ShenandoahHeapRegion
while (obj_addr < tams) {
oop obj = cast_to_oop(obj_addr);
if (marking_context->is_marked(obj)) {
assert(obj->klass() != nullptr, "klass should not be NULL");
assert(obj->klass() != nullptr, "klass should not be null");
// This thread is responsible for registering all objects in this region. No need for lock.
scanner->register_object_without_lock(obj_addr);
obj_addr += obj->size();