This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Reguire __cxa_atexit for ext/{new, throw}_allocator/deallocate_global.cc


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


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