public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Bad ASSERT check in check_stack?
@ 2013-02-07  5:52 Elad Yosef
  0 siblings, 0 replies; only message in thread
From: Elad Yosef @ 2013-02-07  5:52 UTC (permalink / raw)
  To: eCos Discussion

Hi all,
I get the following assert ("ptr below base") in my application (I
added the prints before the assert)

stack_base 0x80045a88  base 0x80045a68
stack_ptr  0x80045a30  top  0x80046048
ASSERT FAIL: <B>thread.inl          [ 112] <nofunc>()

The faulty thread is B(ETH) but the stack_base belongs to the idle thread.
in addition the TRACE_PRINT() that prints the threads info prints different data

         Idle Thread pri =  31 state =      R id =   1
                     stack base = 80045a68 ptr = 80045b28 size = 00000600
                     sleep reason     NONE wake reason     NONE
                     queue = 00000000      wait info = 00000000
**********************************************************************************************************
I checked the location of the "stack_ptr  0x80045a30" it is located in
inside the idle_thread object.
The idle thread stack is located after the thread object.

I'm wondering if this assert is doing it's job?
It looks like the the "stack_base" is checked against some random
"stack_ptr" value.

Any ideas?

thanks

Elad

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-07  5:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07  5:52 [ECOS] Bad ASSERT check in check_stack? Elad Yosef

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).