Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/macroAssembler_x86.cpp @ 13047:be525e91f65b
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
author | mikael |
---|---|
date | Wed, 06 Nov 2013 06:51:24 -0800 |
parents | 209aa13ab8c0 |
children | 096c224171c4 61746b5f0ed3 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/macroAssembler_x86.cpp Tue Nov 05 02:29:41 2013 -0800 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Wed Nov 06 06:51:24 2013 -0800 @@ -1381,8 +1381,12 @@ 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 );