|
From: <sv...@va...> - 2009-04-28 14:35:37
|
Author: sewardj
Date: 2009-04-28 15:35:34 +0100 (Tue, 28 Apr 2009)
New Revision: 9665
Log:
Fill in just enough of the presented siginfo to make
none/test/x86/badseg pass on Darwin.
Modified:
branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-04-28 11:19:43 UTC (rev 9664)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-04-28 14:35:34 UTC (rev 9665)
@@ -70,8 +70,8 @@
VexGuestX86State gst;
VexGuestX86State gshadow1;
VexGuestX86State gshadow2;
- UChar fake_siginfo[ sizeof(vki_siginfo_t) ];
- UChar fake_ucontext[ sizeof(struct vki_ucontext) ];
+ vki_siginfo_t fake_siginfo;
+ struct vki_ucontext fake_ucontext;
UInt magicPI;
UInt sigNo_private;
vki_sigset_t mask; // saved sigmask; restore when hdlr returns
@@ -147,6 +147,11 @@
frame->mask = tst->sig_mask;
frame->magicPI = 0x31415927;
+ /* Minimally fill in the siginfo and ucontext. Note, utter
+ lameness prevails. Be underwhelmed, be very underwhelmed. */
+ frame->fake_siginfo.si_signo = sigNo;
+ frame->fake_siginfo.si_code = siginfo->si_code;
+
/* Set up stack pointer */
vg_assert(esp == (Addr)&frame->returnAddr);
VG_(set_SP)(tid, esp);
|