Re: getcontext() -> Bus error?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jan 31, 2008, at 7:42 PM, Anton Rang wrote: int main(void) { ucontext_t ctx; getcontext(&ctx); return 0; } Why the bus error? What am I doing wrong? -- Steve Checkoway _______________________________________________ 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... On Jan 31, 2008, at 6:52 PM, Edd Dawson wrote: While I don't understand why you're getting a bus error (haven't looked at the library source), the problem appears to go away if you declare ctx as a global instead of on the stack. Perhaps getcontext() just won't let you save context onto the stack.... Looking at it in gdb, the problem seems to be when you return from main, not during the getcontext() call. This email sent to site_archiver@lists.apple.com
participants (1)
-
Steve Checkoway