|
From: <sv...@va...> - 2010-06-07 20:45:26
|
Author: sewardj
Date: 2010-06-07 21:45:18 +0100 (Mon, 07 Jun 2010)
New Revision: 11162
Log:
Fix incorrect use of VG_STACK_REDZONE_SZB in this file. Since this
value is zero for this platform, the change has no effect, but
nevertheless the code is "logically" incorrect. This makes the
(notional) redzone handling consistent with that in
sigframe-amd64-darwin.c.
Modified:
branches/MACOSX106/coregrind/m_sigframe/sigframe-x86-darwin.c
Modified: branches/MACOSX106/coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- branches/MACOSX106/coregrind/m_sigframe/sigframe-x86-darwin.c 2010-06-07 20:37:56 UTC (rev 11161)
+++ branches/MACOSX106/coregrind/m_sigframe/sigframe-x86-darwin.c 2010-06-07 20:45:18 UTC (rev 11162)
@@ -79,6 +79,8 @@
vki_sigset_t mask; // saved sigmask; restore when hdlr returns
UInt __pad[1];
UChar upper_guardzone[512]; // put nothing here
+ // and don't zero it, since that might overwrite the client's
+ // stack redzone, at least on archs which have one
};
@@ -96,7 +98,7 @@
amd64-linux version, this doesn't appear to handle the redzone
in the same way. */
VG_TRACK( new_mem_stack_signal,
- addr, size - VG_STACK_REDZONE_SZB, tid );
+ addr - VG_STACK_REDZONE_SZB, size, tid );
return True;
}
@@ -222,8 +224,8 @@
tid, tst->arch.vex.guest_EIP);
VG_TRACK( die_mem_stack_signal,
- (Addr)frame,
- sizeof(struct hacky_sigframe) - VG_STACK_REDZONE_SZB );
+ (Addr)frame - VG_STACK_REDZONE_SZB,
+ sizeof(struct hacky_sigframe) );
/* tell the tools */
VG_TRACK( post_deliver_signal, tid, sigNo );
|