[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objc native exceptions

From: Richard Frith-Macdonald
Subject: Re: objc native exceptions
Date: Fri, 27 Jun 2008 18:14:55 +0100

On 27 Jun 2008, at 17:57, Nicola Pero wrote:

On 27 Jun 2008, at 16:35, Richard Frith-Macdonald wrote:

I was wondering if there was any good reason why gnustep-make doesn't enable native exceptions by default if the compiler supports it.

There are some overheads in enabling native exceptions.

I'm not too familiar with the issue, I only know that when I added support for native exceptions to gnustep-make and tried to make it the default, someone else came out and turned it off again by default claiming that the overheads
are high.

That's fine btw - the main problem is that because you need a special configure flag to turn them on, nobody seems to be using native exceptions, so they don't get used / tested / finished. :-(

Which is a pity, because they are a nice feature to have.

Apparently one problem is that they rely on unwinding the stack, and if ffcall (and perhaps ffi) has been used to forward a method using an invocation (including any distributed objects call) then the stack has been messed up and the unwinding fails, so that the exception aborts the process rather than being caught by a handler further down the stack.

That's really bad news when using distributed objects ... you might make a call to another application, an exception is raised in that application, passed back and re-raised in your application which then aborts your app!

So this would appear to be a rather severe drawback as invocations are used quite extensively. Maybe the stack unwinding works if you used libffi for your invocations, but libffi doesn't work on some platforms (eg the debian 64bit intel box I develop on).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]