• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
exception handling path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: USB Serial - RS232
  • Next by Date: Re: USB Serial - RS232
  • Previous by thread: Re: USB Serial - RS232
  • Next by thread: 'lookupd' fails to query DNS
  • Index(es):
    • Date
    • Thread