Skip to content

Commit e4d3c97

Browse files
committed
8350111: [PPC] AsyncGetCallTrace crashes when called while handling SIGTRAP
Reviewed-by: mdoerr, stuefe
1 parent 885338b commit e4d3c97

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/hotspot/cpu/ppc/frame_ppc.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
3+
* Copyright (c) 2012, 2025 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -195,6 +195,15 @@ bool frame::safe_for_sender(JavaThread *thread) {
195195
return false;
196196
}
197197

198+
if (sender_pc() == nullptr) {
199+
// Likely the return pc was not yet stored to stack. We rather discard this
200+
// sample also because we would hit an assertion in frame::setup(). We can
201+
// find any other random value if the return pc was not yet stored to
202+
// stack. We rely on consistency checks to handle this (see
203+
// e.g. find_initial_Java_frame())
204+
return false;
205+
}
206+
198207
return true;
199208
}
200209

0 commit comments

Comments
 (0)