@@ -375,16 +375,17 @@ void ZMark::follow_array_object(objArrayOop obj, bool finalizable) {
375
375
376
376
void ZMark::follow_object (oop obj, bool finalizable) {
377
377
if (_generation->is_old ()) {
378
- if (ZHeap::heap ()->is_old (to_zaddress (obj))) {
379
- if (finalizable ) {
380
- ZMarkBarrierFollowOopClosure< true /* finalizable */ , ZGenerationIdOptional::old> cl;
381
- ZIterator::oop_iterate (obj, &cl) ;
382
- } else {
383
- ZMarkBarrierFollowOopClosure< false /* finalizable */ , ZGenerationIdOptional::old> cl;
384
- ZIterator::oop_iterate (obj, &cl) ;
385
- }
378
+ assert (ZHeap::heap ()->is_old (to_zaddress (obj)), " Should only follow objects from old gen " );
379
+ if (obj-> is_stackChunk () ) {
380
+ // No support for tracing through stack chunks as finalizably reachable
381
+ ZMarkBarrierFollowOopClosure< false /* finalizable */ , ZGenerationIdOptional::old> cl ;
382
+ ZIterator::oop_iterate (obj, &cl);
383
+ } else if ( finalizable) {
384
+ ZMarkBarrierFollowOopClosure< true /* finalizable */ , ZGenerationIdOptional::old> cl ;
385
+ ZIterator::oop_iterate (obj, &cl);
386
386
} else {
387
- fatal (" Catch me!" );
387
+ ZMarkBarrierFollowOopClosure<false /* finalizable */ , ZGenerationIdOptional::old> cl;
388
+ ZIterator::oop_iterate (obj, &cl);
388
389
}
389
390
} else {
390
391
// Young gen must help out with old marking
0 commit comments