Very strange bug

Pascal Chevochot Pascal.Chevochot at irisa.fr
Fri Jun 29 10:01:51 UTC 2001


>>>>> "Joel" == Joel Sherrill <joel at OARcorp.com> writes:

    Joel> Pascal Chevochot wrote:

    >> Hello,
    >> Below, you can find a short program. With rtems 4.5.0/bsp586, it
    >> works
    >> fine. But if I uncomment line `printf("2\n");', then this programm
    >> badly crashes !!! Now, if I replace `printf' by `puts', it works !!!
    >> Could someone make this test on another bsp586 ?


    Joel> I ran it on the sparc/erc32 BSP and it worked fine.  It produced this
    Joel> output:

    Joel> 1
    Joel> id
    Joel> 2
    Joel> wakeup

    Joel> And then went into a tight look in mainThread.  What else does it do?

    Joel> I would normally suspect a stack problem.  I would suspect that printf

Yes it is a stack problem. During my first test, I have only increased
the size of the new thread, forgetting the init thread. If I add
#define CONFIGURE_INIT_TASK_STACK_SIZE 8192, it works.

I am silly, I have not used the stack checker (#define
STACK_CHECKER_ON) sooner.

Pascal.



More information about the users mailing list