Skip to content

Commit 0a3249c

Browse files
committed
8371368: SIGSEGV in JfrVframeStream::next_vframe() on arm64
8372586: Crashes on ppc64(le) after JDK-8371368 Reviewed-by: phh Backport-of: 42f3333
1 parent f18b1ac commit 0a3249c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ static bool compute_top_frame(const JfrSampleRequest& request, frame& top_frame,
217217
const PcDesc* const pc_desc = get_pc_desc(sampled_nm, sampled_pc);
218218
if (is_valid(pc_desc)) {
219219
intptr_t* const synthetic_sp = sender_sp - sampled_nm->frame_size();
220-
top_frame = frame(synthetic_sp, synthetic_sp, sender_sp, pc_desc->real_pc(sampled_nm), sampled_nm);
220+
intptr_t* const synthetic_fp = sender_sp AARCH64_ONLY( - frame::sender_sp_offset);
221+
top_frame = frame(synthetic_sp, synthetic_sp, synthetic_fp, pc_desc->real_pc(sampled_nm), sampled_nm);
221222
in_continuation = is_in_continuation(top_frame, jt);
222223
return true;
223224
}

test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* @library /test/lib
3333
* @build jdk.jfr.event.profiling.BaseTestFullStackTrace
3434
* @run main/othervm jdk.jfr.event.profiling.TestFullStackTrace
35+
* @run main/othervm -XX:CompileCommand=compileonly,jdk.test.lib.jfr.RecurseThread::recurse* -XX:+PreserveFramePointer jdk.jfr.event.profiling.TestFullStackTrace
3536
*/
3637
public class TestFullStackTrace {
3738

0 commit comments

Comments
 (0)