Re: Corrupted stack
Re: Corrupted stack
- Subject: Re: Corrupted stack
- From: email@hidden
- Date: Mon, 6 Mar 2006 08:50:12 +0100
How do you know the stack is corrupt? Are you reading this from gdb,
e.g. "warning: Previous frame pointer identical to this frame
(corrupt stack?)"?
I have "Error from Debugger: Previous frame inner to this frame
(corrupt stack?)"
I also see that a part of the stack is repeated
#0 0x09641cd8 in global constructors keyed to dout at dout_AC.cpp:239
#1 0x8fe15b8c in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
#2 0x8fe0b5b0 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE
#3 0x8fe0ed38 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#4 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#5 0x8fe08ba8 in __dyld_NSLinkModule
#6 0x9002db98 in NSLinkModule
#7 0x96916170 in undefinedHandler
#8 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#9 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#10 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#11 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#12 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#13 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#14 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#15 0x8fe08ba8 in __dyld_NSLinkModule
#16 0x9002db98 in NSLinkModule
#17 0x96916170 in undefinedHandler
#18 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#19 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#20 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#21 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#22 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#23 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#24 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#25 0x8fe08ba8 in __dyld_NSLinkModule
#26 0x9002db98 in NSLinkModule
#27 0x96916170 in undefinedHandler
#28 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#29 0x8fe10e70 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#30 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#31 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#32 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#33 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#34 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#35 0x8fe08ba8 in __dyld_NSLinkModule
#36 0x9002db98 in NSLinkModule
#37 0x96916170 in undefinedHandler
#38 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#39 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#40 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#41 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#42 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#43 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#44 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#45 0x8fe08ba8 in __dyld_NSLinkModule
#46 0x9002db98 in NSLinkModule
#47 0x96916170 in undefinedHandler
#48 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#49 0x8fe10e70 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#50 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#51 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#52 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#53 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#54 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#55 0x8fe08ba8 in __dyld_NSLinkModule
#56 0x9002db98 in NSLinkModule
#57 0x96916170 in undefinedHandler
#58 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#59 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#60 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#61 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#62 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#63 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#64 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#65 0x8fe08ba8 in __dyld_NSLinkModule
#66 0x9002db98 in NSLinkModule
#67 0x96916170 in undefinedHandler
#68 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#69 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#70 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#71 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#72 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#73 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#74 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#75 0x8fe08ba8 in __dyld_NSLinkModule
#76 0x9002db98 in NSLinkModule
#77 0x96916170 in undefinedHandler
#78 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#79 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#80 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#81 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#82 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#83 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#84 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#85 0x8fe08ba8 in __dyld_NSLinkModule
#86 0x9002db98 in NSLinkModule
#87 0x96916170 in undefinedHandler
#88 0x8fe03d74 in
__dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#89 0x8fe10b80 in
__dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#90 0x8fe15040 in
__dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#91 0x8fe15388 in
__dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#92 0x8fe0aaf4 in
__dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#93 0x8fe0eb14 in
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#94 0x8fe0443c in
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#95 0x8fe08ba8 in __dyld_NSLinkModule
#96 0x9002db98 in NSLinkModule
#97 0x969163e4 in __zero_link_init_app
#98 0x00002a5c in __darwin_gcc3_preregister_frame_info
#99 0x0000228c in start
#100 (null)
The reason I ask is I've run into a similar problem and have not
been able to determine if the stack is indeed corrupt. My case the
application runs fine and tracing through the application mostly
works except for one section of code where gdb spits out these
warnings. In this section Xcode also duplicates automatic vars, but
only on the Intel platform (PPC is fine). There's nothing unique
about this code, no indexing into arrays or pointer use, nothing
that screams potential stack corruption. But it does return small
struct (8 bytes) on the stack.
To help in your effort, google "gdb stack corruption". There are a
few articles there, surprisingly, pertaining to PPC. Here are a few
that that may help you out.
http://ask.slashdot.org/article.pl?sid=06/01/11/0011218
http://devpit.org/wiki/GDB
http://lists.debian.org/debian-powerpc/2005/05/msg00201.html
Good luck!
James
On Feb 21, 2006, at 2:36 PM, email@hidden wrote:
Hi
I have a problem while debugging my application with xcode. Before
with codewarrior it was working fine.
The stack is corrupted before running the main() fonction. In
setting globals variable? or even before?
Any idea how I could "watch" at the stack.
Thanks
Vincent
_______________________________________________
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
_______________________________________________
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