Re: waitid() corrupts stack
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Apr 15, 2010, at 8:45 PM, Dave Keck <davekeck@gmail.com> 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 gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Parker