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

Re: Corruption of Static data in shared libraries


  • Subject: Re: Corruption of Static data in shared libraries
  • From: Andrew Kimpton <email@hidden>
  • Date: Wed, 02 Nov 2005 21:34:46 -0800

Cameron Hayne wrote:

On 2-Nov-05, at 9:45 PM, Andrew Kimpton wrote:

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)


This sort of thing might happen if the stack gets too big - e.g. if you have large arrays on the stack. But I thought that current versions of gcc had stack-overrun warnings at runtime.

Otherwise look for wild pointers that might be doing the overwriting.
I think you can get gdb to break when a particular location is written to. Otherwise just narrow in on the problem by printing out the value of the variable (the one that seems to get corrupted) as you step through the code.


I don't think this is a memory corruption problem per-se - this code runs fine under a variety of test scenarios (and I'll double check with Guard Malloc turned on to be sure)..

Using the variable print trick doesn't help - I can see that the variable is fine from the debugger in the preceeding stack frame. That's why I don't think this is a 'corruption of the variable' problem as much as a 'wonky base pointer' for the global data.

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


References: 
 >Corruption of Static data in shared libraries (From: Andrew Kimpton <email@hidden>)
 >Re: Corruption of Static data in shared libraries (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: "Flattening" a static library
  • Next by Date: Disabling indexing based on filename
  • Previous by thread: Re: Corruption of Static data in shared libraries
  • Next by thread: Question about building installers
  • Index(es):
    • Date
    • Thread