From: Julian Seward Date: Thu, 17 Nov 2005 13:03:42 +0000 (+0000) Subject: Get rid of bogus assertion. X-Git-Tag: svn/VALGRIND_3_1_0~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4acdbb3ba6c32516fa9f53ed283d451adcb8c55;p=thirdparty%2Fvalgrind.git Get rid of bogus assertion. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5166 --- diff --git a/coregrind/m_sigframe/sigframe-ppc32-linux.c b/coregrind/m_sigframe/sigframe-ppc32-linux.c index 148d1c4b9d..cdf84d0840 100644 --- a/coregrind/m_sigframe/sigframe-ppc32-linux.c +++ b/coregrind/m_sigframe/sigframe-ppc32-linux.c @@ -873,25 +873,31 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) /* Check that the stack frame looks valid */ sp = tst->arch.vex.guest_GPR1; vg_assert(VG_IS_16_ALIGNED(sp)); - frame_size = *(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. */ if (has_siginfo) { struct rt_sigframe *frame = (struct rt_sigframe *)sp; - vg_assert(frame_size == sizeof(*frame)); + frame_size = sizeof(*frame); mc = &frame->ucontext.uc_mcontext; priv = &frame->priv; + vg_assert(priv->magicPI == 0x31415927); tst->sig_mask = frame->ucontext.uc_sigmask; } else { struct nonrt_sigframe *frame = (struct nonrt_sigframe *)sp; - vg_assert(frame_size == sizeof(*frame)); + frame_size = sizeof(*frame); mc = &frame->mcontext; priv = &frame->priv; + vg_assert(priv->magicPI == 0x31415927); tst->sig_mask.sig[0] = frame->sigcontext.oldmask; tst->sig_mask.sig[1] = frame->sigcontext._unused[3]; } tst->tmp_sig_mask = tst->sig_mask; - vg_assert(priv->magicPI == 0x31415927); sigNo = priv->sigNo_private; # define DO(gpr) tst->arch.vex.guest_GPR##gpr = mc->mc_gregs[VKI_PT_R0+gpr]