< prev index next >

src/hotspot/cpu/x86/frame_x86.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. 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,7 ---- /* ! * Copyright (c) 1997, 2020, Oracle and/or its affiliates. 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.
*** 55,74 **** address sp = (address)_sp; address fp = (address)_fp; address unextended_sp = (address)_unextended_sp; // consider stack guards when trying to determine "safe" stack pointers - static size_t stack_guard_size = os::uses_stack_guard_pages() ? - JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_zone_size() : 0; - size_t usable_stack_size = thread->stack_size() - stack_guard_size; - // sp must be within the usable part of the stack (not in guards) ! bool sp_safe = (sp < thread->stack_base()) && ! (sp >= thread->stack_base() - usable_stack_size); ! ! ! if (!sp_safe) { return false; } // unextended sp must be within the stack and above or equal sp bool unextended_sp_safe = (unextended_sp < thread->stack_base()) && --- 55,66 ---- address sp = (address)_sp; address fp = (address)_fp; address unextended_sp = (address)_unextended_sp; // consider stack guards when trying to determine "safe" stack pointers // sp must be within the usable part of the stack (not in guards) ! if (!thread->is_in_usable_stack(sp)) { return false; } // unextended sp must be within the stack and above or equal sp bool unextended_sp_safe = (unextended_sp < thread->stack_base()) &&
*** 551,561 **** // validate locals address locals = (address) *interpreter_frame_locals_addr(); ! if (locals > thread->stack_base() || locals < (address) fp()) return false; // We'd have to be pretty unlucky to be mislead at this point return true; } --- 543,553 ---- // validate locals address locals = (address) *interpreter_frame_locals_addr(); ! if (locals >= thread->stack_base() || locals < (address) fp()) return false; // We'd have to be pretty unlucky to be mislead at this point return true; }
< prev index next >