This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Help: Unwinding the C++ stack...throw, longjmp & threads
- To: Oleg Krivosheev <kriol@fnal.gov>
- Subject: Re: Help: Unwinding the C++ stack...throw, longjmp & threads
- From: "George T. Talbot" <george@moberg.com>
- Date: Thu, 19 Aug 1999 11:20:26 -0400
- CC: gcc@gcc.gnu.org, libc-alpha@sourceware.CYGNUS.com, drepper@cygnus.com
- Organization: Moberg Research, Inc.
- References: <Pine.GSO.4.05.9908181428470.23915-100000@wally.fnal.gov>
Oleg Krivosheev wrote:
>
> Hi,
>
> On Wed, 18 Aug 1999, George T. Talbot wrote:
>
> > This is a request for assistance, as I don't know the right person to
> > ask.
> >
> > I'm working on a solution for deferred pthread_cancel() under Linux.
> > What I want is to unwind the stack when the thread is cancelled so that
> > C++ destructors for objects on the stack get called.
> >
> > If I recompile the C library with the -fexceptions flag, I can throw an
> > exception in a cancellation handler, and this does what I want. My
> > platform is Linux x86.
> >
> > However, after talking to Ulrich Drepper at LWCE, he says that
> > recompiling the C library with -fexceptions slows it down by around 5%.
> > So, obviously, he won't accept a patch to the main-line source to do
> > this, with very good reason.
>
> just curious, what exactly was measured and how?
I don't know. Mr. Drepper, can you tell us what was measured? Was this
with the new exception model or the old setjmp()/longjmp() exception
model?
--
George T. Talbot
<george@moberg.com>