This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: assertion failed with msg "stack top alignment"
- From: Andrew Lunn <andrew at lunn dot ch>
- To: rakesh <mljangir at yahoo dot co dot in>
- Cc: ecos-mailing-list <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 8 Sep 2003 17:25:48 +0200
- Subject: Re: [ECOS] assertion failed with msg "stack top alignment"
- References: <20030908110313.31360.qmail@web8005.mail.in.yahoo.com>
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