Skip to content

Commit 18dd4d4

Browse files
committedAug 5, 2021
8271121: ZGC: stack overflow (segv) when -Xlog:gc+start=debug
Reviewed-by: ayang, eosterlund
1 parent 685fc3c commit 18dd4d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/hotspot/share/gc/z/zStat.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,10 @@ ZStatCriticalPhase::ZStatCriticalPhase(const char* name, bool verbose) :
760760
_verbose(verbose) {}
761761

762762
void ZStatCriticalPhase::register_start(const Ticks& start) const {
763-
LogTarget(Debug, gc, start) log;
764-
log_start(log, true /* thread */);
763+
// This is called from sensitive contexts, for example before an allocation stall
764+
// has been resolved. This means we must not access any oops in here since that
765+
// could lead to infinite recursion. Without access to the thread name we can't
766+
// really log anything useful here.
765767
}
766768

767769
void ZStatCriticalPhase::register_end(const Ticks& start, const Ticks& end) const {

0 commit comments

Comments
 (0)
Failed to load comments.