• 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: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4?


  • Subject: Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4?
  • From: Steve Checkoway <email@hidden>
  • Date: Tue, 7 Feb 2006 12:50:16 -0800


On Feb 7, 2006, at 10:51 AM, Gen Kiyooka wrote:

On Feb 7, 2006, at 4:46 AM, Peter O'Gorman wrote:
I'm not entirely sure what you're trying to prove here. #pragma CALL_ON_LOAD
et.al. are deprecated on Mac OS X 10.4, in favor of gcc's
__attribute__((constructor)) and __attribute__((destructor))
<http://developer.apple.com/releasenotes/DeveloperTools/dyld.html>.


C++ constructors and destructors work better in 10.4, and the problems with
c++ on 10.3.x and earlier were, I believe, one of the main reasons for the
rewrite of dyld.

I prefaced my response with the statement that my test apps were written with CW.


Regarding the usefulness of my post, the main point is that there are differences
in the way that bundles, dylibs and frameworks are loaded and unloaded, and
if one is assuming a certain behaviour it might be wise to printf/ trace the
actual behaviour and compare it with one's assumptions.

I can't say I've ever actually used these but from <mach-o/dyld.h>

extern void _dyld_register_func_for_add_image(
    void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
extern void _dyld_register_func_for_remove_image(
    void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
extern void _dyld_register_func_for_link_module(
    void (*func)(NSModule module));

Looks like you could use these to trace the loading/unloading behavior.

- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4? (From: "John C. Daub" <email@hidden>)
 >Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4? (From: Gen Kiyooka <email@hidden>)
 >Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4? (From: "Peter O'Gorman" <email@hidden>)
 >Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4? (From: Gen Kiyooka <email@hidden>)

  • Prev by Date: Re: generating a core file in 10.4.4. [resolved]
  • Next by Date: Re: errno in debug vs. release
  • Previous by thread: Re: crash in __static_initialization_and_destruction on 10.3.9 but not 10.4.4?
  • Next by thread: Re: Making XCode realize a file/resource has been updated
  • Index(es):
    • Date
    • Thread