This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: eCos2 stack base corrupted?
>>>>> "Fredrik" == Fredrik Hederstierna <fredrik@wespot.com> writes:
Fredrik> I have done this, otherwise I wouldnt get this ASSERT.static.
Fredrik> Its the stack _base_address_ (a member variable in the
Fredrik> hardware thread struct) that is trashed, not stack
Fredrik> overflow that is the problem I believe. I do not know if
Fredrik> the threads are allocated at consecutive memory with the
Fredrik> stacks, I guess thread-structs are in the '.data' segment
Fredrik> and the actual stacks in the '.bss' section.
A quick look at the kernel headers suggests that the stack base is the
very first field of the thread structure (or rather, it is the first
field of a Cyg_HardwareThread which is the first base class of a
Cyg_Thread). Hence one possibility is that you are overflowing the
previous data structure. Assuming the thread data is statically
allocated, you can relink the application to get a linker map and
use that to figure out what other data structure is just in front of
the thread.
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss