• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
      • From: "Andy O'Meara" <email@hidden>
    • Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
      • From: "James W. Walker" <email@hidden>
References: 
 >Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help! (From: "Andy O'Meara" <email@hidden>)
 >Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help! (From: "James W. Walker" <email@hidden>)

  • Prev by Date: Re: Corrupted stack? (Was: Has anyone else seen this GDB error?)
  • Next by Date: XCode and C++ linking problem
  • Previous by thread: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • Next by thread: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • Index(es):
    • Date
    • Thread