public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Elad Yosef <elad.yosef@gmail.com>
To: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: [ECOS] Bad ASSERT check in check_stack?
Date: Thu, 07 Feb 2013 05:52:00 -0000	[thread overview]
Message-ID: <CAOFa9c1-KuNkvrHA7XFySSk5ZM7Eb6NDBqXqmHYJKZa_tCTD8w@mail.gmail.com> (raw)

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

                 reply	other threads:[~2013-02-07  5:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOFa9c1-KuNkvrHA7XFySSk5ZM7Eb6NDBqXqmHYJKZa_tCTD8w@mail.gmail.com \
    --to=elad.yosef@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).