This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: assertion failed with msg "stack top alignment"


On Mon, Sep 08, 2003 at 04:03:13AM -0700, rakesh wrote:
> I have enabled assertion in configtool. My code
> asserts in file thread.inl in function
> Cyg_Hardware_Thread::attach_stack() at line number
> 204. The assertion messages is "stack top alignment".
> Without enabling assertion, application is running
> well. I am running two threads in my application. How
> do I know, which thread's stack has alignment proble?

Put a breakpoint at cyg_assert_fail. When gdb stops, do "bt" and you
will get a stack backtrace. You can then see where the function is
being called from.

> I have 64kb and 4 kb size stack for two threads. How
> come these values are non-aligned?

Its not the size that matters, but the alignment. How do you generate
the space for these stacks?

    Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]