This is the mail archive of the ecos-discuss@sourceware.org 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]

Bad ASSERT check in check_stack?


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


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