exception handling path
exception handling path
- Subject: exception handling path
- From: "Neal Sidhwaney" <email@hidden>
- Date: Mon, 9 Jun 2008 15:01:48 -0700
Hi
I have a scenario in which I'm getting an EXC_BAD_ACCESS crash when handling an exception while calling exc_server. The stack looks like this:
#0 0x00005000 in catch_exception_raise ()
#1 0x90808ce0 in _Xexception_raise ()
#2 0x90808bb3 in exc_server ()
The address 0x5000 is not mapped in the process when I look at via VMMAP at the time of the crash. When I step through the assembly I see that dyld_lookup_and_bind("catch_exception_raise",...) is returning 0x5000 for the function "catch_exception_raise". I have implemented this function in my binary.
However, if I run MIG on exc.defs from the XNU source and add excServer.c & excUser.c to my project, so that those implementations for exc_server() et al are used rather than the ones from libSystem, it works! I traced this to the function Xexception_raise inside excServer.c calling catch_exception_raise directly. However the Xexception_raise inside libSystem that I single step through calls internal_catch_exception_raise which does the dyld_lookup_and_bind.
So, I am wondering two things: what would cause dyld_lookup_and_bind to return 0x5000 for "catch_exception_raise"? And why is the source I generate from exc.defs apparently different from what is inside libSystem?
Thank you :-)
Neal
_______________________________________________
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