• 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
How to debug a corrupted stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to debug a corrupted stack


  • Subject: How to debug a corrupted stack
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 6 Aug 2008 09:51:31 +0700

I have a document based app which works perfectly with -O0 or -O1 but crashes with -O2 or higher.

When the crash occurs the debugger comes up and says: "Previous frame identical to this frame (corrupt stack?)"

When I try to step through the function (which is kind of difficult, as the optimization has shuffled the lines a lot) at some time the top frame of the stack gets duplicated.

The faulty method starts with:
NSString *path = @"/Users/gerriet/Desktop/some alias"; // error with -O2


If it starts with:
	NSString *path = @"/Users/gerriet/Desktop/some file";	//	ok with -O2
then everything works perfectly.

When I comment out the place where the error seems to occur, it will just occur at some earlier place.

So it is kind of difficult to see where and why the stack gets corrupted.

Any help would be most welcome. I am completely run out of ideas and spent already hours with this bug.

Tiger 10.4.11, C Language Dialect C99 or GNU99, powerpc-apple-darwin8- gcc-4.0.1


Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to debug a corrupted stack
      • From: "Sean McBride" <email@hidden>
    • Re: How to debug a corrupted stack
      • From: "Shawn Erickson" <email@hidden>
    • Re: How to debug a corrupted stack
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Bindings to display an NSArray of NSStrings as a single NSString?
  • Next by Date: Re: Using performSelector: on super
  • Previous by thread: Re: Bindings to display an NSArray of NSStrings as a single NSString?
  • Next by thread: Re: How to debug a corrupted stack
  • Index(es):
    • Date
    • Thread