This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Reguire __cxa_atexit for ext/{new, throw}_allocator/deallocate_global.cc
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 24 Feb 2010 16:09:45 +0000
- Subject: Re: PATCH: Reguire __cxa_atexit for ext/{new, throw}_allocator/deallocate_global.cc
- References: <yddtyt6ln07.fsf@CeBiTec.Uni-Bielefeld.DE> <4B853C02.5000204@oracle.com>
On 24/02/2010 14:47, Paolo Carlini wrote:
> Hi,
>> I haven't yet read up on the semantics of __cxa_atexit, but looking
>> through the OpenSolaris sources
>>
>> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/common/i386/crt1.s#101
>>
>> I found that atexit() has a hook for a _get_exit_frame_monitor()
>> function with a reference to the C++ runtime. It's most likely possible
>> to use this to provide a __cxa_atexit() replacement in libgcc, and
>> perhaps get Sun to implement (or accept an implementation) of
>> __cxa_atexit() into their libc to fix the problem once and for all.
>>
> If you could further investigate this, it would be great. Thanks for the
> analysis, anyway.
>> Ok for mainline?
>>
> Yes, thanks.
Shouldn't this be xfailed on solaris, rather than skipped on all
non-cxa_atexit targets?
The FAIL in this case is indicating an ABI violation w.r.t order of dtors,
which could equally happen on non-cxa_atexit systems that implement some
variant scheme (such as e.g. get_exit_frame_monitor hooks!) and it seems
useful to me if the testsuite flags that up, regardless of the internal
implementation details of how the system handles (or, in this case, fails to
handle correctly) finalisation.
cheers,
DaveK