How to debug a corrupted stack
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