[Top][All Lists]

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

[libunwind] gcc unwind ABI change?

From: Jim Wilson
Subject: [libunwind] gcc unwind ABI change?
Date: 09 May 2003 00:22:32 -0400

Gcc just added another entry point to its unwind ABI,
Unwind_Resume_or_Rethrow.  This will cause problems for libunwind and
probably also HPUX unless they add the same function to their unwind
libraries.  Probably this needs to be discussed by an ABI group

This whole mess started when people tried to get posix thread
cancellation to inter-operate with C++ exception handling.

There was one group, led primarily by Richard Henderson, who wanted to
extend the C front end to support try/finally (same as Java and MS C),
and use that in glibc to implement posix thread cancellation with forced
unwinds, which would mostly ignore C++ catch clauses.

There was a second group, led primarily by Mark Mitchell, who did not
want another C front end syntax extension, and who wanted posix thread
cancellation to be a regular C++ exception, so it could be caught by a
C++ catch clause.

I'm probably not explaining all of the subtleties correctly and
completely.  There were many long and tedious arguments about how this
stuff should work.

The second group didn't budge, so Richard Henderson implemented a scheme
that implements the latter, and in order to make it work, he had to add
a new function to the unwind ABI.  Unwind_Resume_or_Rethrow is used
during forced unwinds, if a catch clause tries to rethrow an exception,
and there is no outer handler, then you resume the forced unwind instead
of calling std::terminate.  Assuming I got that right, I don't fully
understand all of this stuff.

Along the way, we also got a new attribute ((cleanup(function)) so that
C code can define destructors.  This was considered by some to be a
better option than try/finally.

The message that justifies the unwind ABI change is here:

There were numerous threads before this.  Here are a few of them:


reply via email to

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