Mach-exception forwarding changed on Leopard?
Mach-exception forwarding changed on Leopard?
- Subject: Mach-exception forwarding changed on Leopard?
- From: Carl Seleborg <email@hidden>
- Date: Thu, 12 Jun 2008 10:59:55 +0200
- Organization: Ableton AG
Hello,
(Sorry for cross-posting, I originally posted to
Darwin-userlevel last week, but I don't think it was the
right place.)
I've implemented a Mach-exception forwarding mechanism in an
application (GCC, x86) because I want to do one last thing
before the application dies, and I want the CrashReporter to
generate this beautifully complete crash log. I more or less
followed the mechanism described here (found by searching
these lists):
http://www.brianweb.net/misc/mach_exceptions_demo.c
(If link is broken, google for "this is not specific to mach
exception handling")
I use EXCEPTION_THREAD_STATE_IDENTITY instead of
EXCEPTION_DEFAULT as the behavior. Otherwise, it's pretty
similar.
On 10.4, the mechanism works great. Not on 10.5, however,
the application just "hangs", not processing any messages
anymore (Activity Monitor says application not answering).
From the sampling, it looks like the exception-handling
thread is stuck in catch_exception_raise_*() and does not
want to continue.
I notice two differences between 10.4 and 10.5:
- On 10.4, there is always an installed exception handler. I
assume that a non-null port number means exactly that. On
10.5, there is none (task_get_exception_ports() returns one
set of values, and the port number is 0).
- On 10.4, my own implementation of
catch_exception_raise_foo() gets called from exc_server().
On 10.5, not so, even though I've implemented all three
versions. It looks like exc_server() calls some
system-provided implementation which blocks.
Also, I notice that gdb on 10.5, for instance, installs
strange (uninitialized) values for the exception behavior
(none of default, state or state_identity).
So: does anyone know where these differences come from? Any
clue as to why my own catch_exception_raise() does not get
called on 10.5?
Any info would be gladly appreciated.
Best regards,
Carl Seleborg
_______________________________________________
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