hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
changeset 21528 479228ecf6ac
parent 21189 e851a0a007ce
child 24018 77b156916bab
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Tue Nov 05 02:29:41 2013 -0800
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Wed Nov 06 06:51:24 2013 -0800
@@ -3526,8 +3526,12 @@
   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);
   }