Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- Subject: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- From: Allen Cronce <email@hidden>
- Date: Sat, 10 Jun 2006 11:34:43 -0700
I would have thought that relying on atexit for cleanup of a
non-application executable could result in undefined behavior. Because
you really don't have control over when your bundle is unloaded.
Shouldn't you use a module termination proc or "__attribute__
((destructor))" instead?
Note that if ordered construction/destruction is important, you can use
the init_priority attribute:
http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/C_002b_002b-Attributes.html
Best,
--
Allen Cronce
James W. Walker wrote:
>
> On Jun 10, 2006, at 7:03 AM, Andy O'Meara wrote:
>
>> I'm happy to report that adding -fno-use-cxo-atexit to my bundle project
>> made the problem go away as well. Great work, James!
>
> Cool.
>
> One other thing I'd like to add to this thread: If an unloadable
> bundle calls atexit(), then there will be a crash on quit under
> Panther regardless of whether -fno-use-cxo-atexit or -fuse-cxo-atexit
> is used.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden