Re: waitid() corrupts stack
Re: waitid() corrupts stack
- Subject: Re: waitid() corrupts stack
- From: Greg Parker <email@hidden>
- Date: Fri, 16 Apr 2010 09:41:55 -0700
On Apr 15, 2010, at 8:45 PM, Dave Keck <email@hidden> wrote:
> Greg Parker wrote:
>> The kernel is writing the wrong size value into your siginfo_t variable. It looks like it's writing the 64-bit version of siginfo_t, but your 32-bit process has a smaller siginfo_t type. (siginfo_t has pointer and longint fields that change size.)
>>
>> If you don't need the siginfo_t's values, you should be able to get away with passing a bigger buffer to waitid().
>
> Ah, thanks for the explanation. I presume all members preceding
> si_addr should be safe?
I think so. You can double-check by writing a test program to print `sizeof(siginfo_t->si_whatever) and `offsetof(siginfo_t, si_whatever)` on both architectures.
On Apr 15, 2010, at 9:25 PM, Kevin Van Vechten wrote:
> Please file a bug report at http://bugreporter.apple.com/
He already did: rdar://7871139 . Thanks, Dave.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden