< prev index next >

src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp

Print this page
rev 48556 : 8196401: PPC64+s390: get_frame_at_stack_banging_point uses wrong PC
Reviewed-by: stuefe

*** 1,8 **** /* ! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,8 ---- /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2012, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 118,127 **** --- 118,131 ---- void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) { guarantee(uc->uc_mcontext.regs != NULL, "only use ucontext_set_pc in sigaction context"); uc->uc_mcontext.regs->nip = (unsigned long)pc; } + static address ucontext_get_lr(const ucontext_t * uc) { + return (address)uc->uc_mcontext.regs->link; + } + intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) { return (intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/]; } intptr_t* os::Linux::ucontext_get_fp(const ucontext_t * uc) {
*** 175,187 **** // Not sure where the pc points to, fallback to default // stack overflow handling. In compiled code, we bang before // the frame is complete. return false; } else { - intptr_t* fp = os::Linux::ucontext_get_fp(uc); intptr_t* sp = os::Linux::ucontext_get_sp(uc); ! *fr = frame(sp, (address)*sp); if (!fr->is_java_frame()) { assert(fr->safe_for_sender(thread), "Safety check"); assert(!fr->is_first_frame(), "Safety check"); *fr = fr->java_sender(); } --- 179,191 ---- // Not sure where the pc points to, fallback to default // stack overflow handling. In compiled code, we bang before // the frame is complete. return false; } else { intptr_t* sp = os::Linux::ucontext_get_sp(uc); ! address lr = ucontext_get_lr(uc); ! *fr = frame(sp, lr); if (!fr->is_java_frame()) { assert(fr->safe_for_sender(thread), "Safety check"); assert(!fr->is_first_frame(), "Safety check"); *fr = fr->java_sender(); }
< prev index next >