< prev index next >

src/hotspot/cpu/s390/frame_s390.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2019, 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 --- 1,7 ---- /* ! * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2019, 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
*** 57,77 **** bool safe = false; 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_reserved_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 bool unextended_sp_safe = (unextended_sp < thread->stack_base()); --- 57,69 ---- bool safe = false; 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 bool unextended_sp_safe = (unextended_sp < thread->stack_base());
*** 79,92 **** if (!unextended_sp_safe) { return false; } // An fp must be within the stack and above (but not equal) sp. ! bool fp_safe = (fp <= thread->stack_base()) && (fp > sp); // An interpreter fp must be within the stack and above (but not equal) sp. // Moreover, it must be at least the size of the z_ijava_state structure. ! bool fp_interp_safe = (fp <= thread->stack_base()) && (fp > sp) && ((fp - sp) >= z_ijava_state_size); // We know sp/unextended_sp are safe, only fp is questionable here // If the current frame is known to the code cache then we can attempt to --- 71,84 ---- if (!unextended_sp_safe) { return false; } // An fp must be within the stack and above (but not equal) sp. ! bool fp_safe = (fp < thread->stack_base()) && (fp > sp); // An interpreter fp must be within the stack and above (but not equal) sp. // Moreover, it must be at least the size of the z_ijava_state structure. ! bool fp_interp_safe = (fp < thread->stack_base()) && (fp > sp) && ((fp - sp) >= z_ijava_state_size); // We know sp/unextended_sp are safe, only fp is questionable here // If the current frame is known to the code cache then we can attempt to
*** 142,152 **** // Do we have a valid fp? address sender_fp = (address) sender.fp(); // sender_fp must be within the stack and above (but not // equal) current frame's fp. ! if (sender_fp > thread->stack_base() || sender_fp <= fp) { return false; } // If the potential sender is the interpreter then we can do some more checking. if (Interpreter::contains(sender_pc)) { --- 134,144 ---- // Do we have a valid fp? address sender_fp = (address) sender.fp(); // sender_fp must be within the stack and above (but not // equal) current frame's fp. ! if (sender_fp >= thread->stack_base() || sender_fp <= fp) { return false; } // If the potential sender is the interpreter then we can do some more checking. if (Interpreter::contains(sender_pc)) {
< prev index next >