This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help: Unwinding the C++ stack...throw, longjmp & threads


On Wed, Aug 18, 1999 at 11:52:05AM -0400, George T. Talbot wrote:
> I would like to write a function which unwinds the stack similarly to
> what happens at a throw in C++, but which wouldn't require recompiling
> existing libraries written in C.
> 
> Is this possible?

Possible using -fsjlj-exceptions, which is an abomination, so "no".

> Also, does setjmp()/longjmp() assure that C++ destructors for
> stack-based objects are called?

No.

We should instead figure out why the 5% performance degradation
and fix it.  IN THEORY, it shouldn't matter -- the complexity to
compilation comes when you have exception handlers, not throws.
We should not care that some called function throws through any
more than we care if they longjmp though.

Probably it is the case that some pass that has yet to be 
converted to the properly use the new CFG is misinterpreting
basic block boundaries in the presence of flag_exceptions.


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]