[ECOS] assertion failed with msg "stack top alignment"

Andrew Lunn andrew@lunn.ch
Mon Sep 8 15:25:00 GMT 2003


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



More information about the Ecos-discuss mailing list