[cfe-commits] r154191 - in /cfe/trunk: lib/CodeGen/CGDeclCXX.cpp test/CodeGenCXX/arm.cpp test/CodeGenCXX/global-dtor-no-atexit.cpp test/CodeGenCXX/global-init.cpp test/CodeGenCXX/static-init.cpp
rjmccall at apple.com
Fri Apr 6 18:45:31 PDT 2012
On Apr 6, 2012, at 4:28 PM, Joerg Sonnenberger wrote:
> On Fri, Apr 06, 2012 at 06:21:06PM -0000, John McCall wrote:
>> Use atexit when __cxa_atexit isn't available instead of adding a
>> global destructor entry. For some reason this isn't enabled for
>> apple-kexts; it'd be good to have documentation for that.
> Are you sure that this won't run into atexit(3) limits? Some platforms
> IIRC had a somewhat tight limit for those.
This is the traditional behavior of -fno-use-cxa-atexit as documented
by GCC, at least for static locals. We're very likely using atexit in
places where we could and should be using a global destructor
instead, but those are separable bugs.
I mean, personally, I think this has been standardized for over a decade
and people ought to have started shipping __cxa_atexit on their
platforms by now, but if they still haven't gotten their act together, their
users would probably rather build and run into implementation limits
than not be able to build at all.
More information about the cfe-commits