Skip to content

Commit 02f6fef

Browse files
committedApr 21, 2022
Fix heap walker issues
1 parent 5728d01 commit 02f6fef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/hotspot/share/oops/instanceStackChunkKlass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ class OopIterateStackChunkFrameClosure {
145145
};
146146

147147
void InstanceStackChunkKlass::oop_oop_iterate_stack_slow(stackChunkOop chunk, OopIterateClosure* closure, MemRegion mr) {
148+
if (UseZGC || UseShenandoahGC) {
149+
// An OopClosure could apply barriers to a stack chunk. The side effects
150+
// of the load barriers could destroy derived pointers, which must be
151+
// processed before their base oop is processed. So we force processing
152+
// of derived pointers before applying the closures.
153+
chunk->relativize_derived_pointers_concurrently();
154+
}
148155
OopIterateStackChunkFrameClosure frame_closure(closure, mr);
149156
chunk->iterate_stack(&frame_closure);
150157
}

0 commit comments

Comments
 (0)
Please sign in to comment.