• 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
Corruption of Static data in shared libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Corruption of Static data in shared libraries


  • Subject: Corruption of Static data in shared libraries
  • From: Andrew Kimpton <email@hidden>
  • Date: Wed, 2 Nov 2005 18:45:07 -0800

I have two shared libraries (CFBundle plugins) which in turn each load one additional shared library (different for each). I'm running into a problem where static class variables seem to be corrupted (often being 'reset' to zero) during execution, particular after one pair of these libraries has been unloaded and a different pair loaded.

Strangely the corruption is not occuring 'at the beginning' but some time later, as if it's not the variable itself that's being corrupted but rather either the code in the binary is incorrect or the register pointing to the 'global space' is being changed incorrectly between method invocations.

What sort of tricks/tools are there in Xcode (et al) to try and track this down/diagnose this ? What I'd really like to be able to see is the dissassembled code inline with the C code in the debugger (a la Shark) and a register window so I can compare successive retrievals of the static data and see if there's an obvious mistake or pattern to the problem. Whilst I can get the dissassembled code it contains mangled symbol names which makes it a real pain to match up with the C code (and the dissassembly view doesn't 'go backwards' from the current breakpoint/line counter - so I can't view previous code). Also is there an online reference to the Mach-O calling convention for register setup etc. when it comes to retrieving static data from a class ?

Many thanks

Andrew 8-)

_______________________________________________
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: Corruption of Static data in shared libraries
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: "Flattening" a static library
  • Next by Date: Question about building installers
  • Previous by thread: Re: [Xcode] creating lib from .a files
  • Next by thread: Re: Corruption of Static data in shared libraries
  • Index(es):
    • Date
    • Thread