|
From: <sv...@va...> - 2005-11-17 13:03:46
|
Author: sewardj
Date: 2005-11-17 13:03:42 +0000 (Thu, 17 Nov 2005)
New Revision: 5166
Log:
Get rid of bogus assertion.
Modified:
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c 2005-11-17 12:31:12=
UTC (rev 5165)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c 2005-11-17 13:03:42=
UTC (rev 5166)
@@ -873,25 +873,31 @@
/* Check that the stack frame looks valid */
sp =3D tst->arch.vex.guest_GPR1;
vg_assert(VG_IS_16_ALIGNED(sp));
- frame_size =3D *(Addr *)sp - sp;
+ /* JRS 17 Nov 05: This code used to check that *sp -- which should
+ have been set by the stwu at the start of the handler -- points
+ to just above the frame (ie, the previous frame). However, that
+ isn't valid when delivering signals on alt stacks. So I removed
+ it. The frame is still sanity-checked using the priv->magicPI
+ field. */
=20
if (has_siginfo) {
struct rt_sigframe *frame =3D (struct rt_sigframe *)sp;
- vg_assert(frame_size =3D=3D sizeof(*frame));
+ frame_size =3D sizeof(*frame);
mc =3D &frame->ucontext.uc_mcontext;
priv =3D &frame->priv;
+ vg_assert(priv->magicPI =3D=3D 0x31415927);
tst->sig_mask =3D frame->ucontext.uc_sigmask;
} else {
struct nonrt_sigframe *frame =3D (struct nonrt_sigframe *)sp;
- vg_assert(frame_size =3D=3D sizeof(*frame));
+ frame_size =3D sizeof(*frame);
mc =3D &frame->mcontext;
priv =3D &frame->priv;
+ vg_assert(priv->magicPI =3D=3D 0x31415927);
tst->sig_mask.sig[0] =3D frame->sigcontext.oldmask;
tst->sig_mask.sig[1] =3D frame->sigcontext._unused[3];
}
tst->tmp_sig_mask =3D tst->sig_mask;
=20
- vg_assert(priv->magicPI =3D=3D 0x31415927);
sigNo =3D priv->sigNo_private;
=20
# define DO(gpr) tst->arch.vex.guest_GPR##gpr =3D mc->mc_gregs[VKI_PT_=
R0+gpr]
|