Skip to content

Commit 895101c

Browse files
committed
8350111: [PPC] AsyncGetCallTrace crashes when called while handling SIGTRAP
Reviewed-by: mbaesken Backport-of: e4d3c97c0f388fc4b1684b78844f2166277ffd91
1 parent c19f86d commit 895101c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/hotspot/cpu/ppc/frame_ppc.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2023 SAP SE. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. 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
@@ -191,6 +191,15 @@ bool frame::safe_for_sender(JavaThread *thread) {
191191
return false;
192192
}
193193

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

0 commit comments

Comments
 (0)