提交 cb9f828c 编写于 作者: M mikael

8026775: nsk/jvmti/RedefineClasses/StressRedefine crashes due to EXCEPTION_ACCESS_VIOLATION

Summary: Uncommon trap blob did not bang all the stack shadow pages
Reviewed-by: kvn, twisti, iveresov, jrose
上级 d32e17c6
......@@ -3526,8 +3526,12 @@ void MacroAssembler::bang_stack_size(Register Rsize, Register Rtsp,
delayed()->sub(Rtsp, Roffset, Rtsp);
// Bang down shadow pages too.
// The -1 because we already subtracted 1 page.
for (int i = 0; i< StackShadowPages-1; i++) {
// At this point, (tmp-0) is the last address touched, so don't
// touch it again. (It was touched as (tmp-pagesize) but then tmp
// was post-decremented.) Skip this address by starting at i=1, and
// touch a few more pages below. N.B. It is important to touch all
// the way down to and including i=StackShadowPages.
for (int i = 1; i <= StackShadowPages; i++) {
set((-i*offset)+STACK_BIAS, Rscratch);
st(G0, Rtsp, Rscratch);
}
......
......@@ -1381,8 +1381,12 @@ void MacroAssembler::bang_stack_size(Register size, Register tmp) {
jcc(Assembler::greater, loop);
// Bang down shadow pages too.
// The -1 because we already subtracted 1 page.
for (int i = 0; i< StackShadowPages-1; i++) {
// At this point, (tmp-0) is the last address touched, so don't
// touch it again. (It was touched as (tmp-pagesize) but then tmp
// was post-decremented.) Skip this address by starting at i=1, and
// touch a few more pages below. N.B. It is important to touch all
// the way down to and including i=StackShadowPages.
for (int i = 1; i <= StackShadowPages; i++) {
// this could be any sized move but this is can be a debugging crumb
// so the bigger the better.
movptr(Address(tmp, (-i*os::vm_page_size())), size );
......
......@@ -122,7 +122,7 @@ void AbstractAssembler::bind(Label& L) {
void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes) {
if (UseStackBanging) {
// Each code entry causes one stack bang n pages down the stack where n
// is configurable by StackBangPages. The setting depends on the maximum
// is configurable by StackShadowPages. The setting depends on the maximum
// depth of VM call stack or native before going back into java code,
// since only java code can raise a stack overflow exception using the
// stack banging mechanism. The VM and native code does not detect stack
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册