Someone will have to find the bug in gcc-3.2.1->gcc-3.2.3 causingticker to crash for pc386
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Apr 3 15:37:16 UTC 2003
Valette Eric wrote:
>
> Valette Eric wrote:
>
> > Putting printk and using bochs, I can say the init thread is running
> > doing the task create, the task start but the newly created ticker
> > threads are not even started... The crash seems to occur in the middle
> > of the context switch. Just to be sure that it is not due to an irq, I
> > added a asm volatile ("sti") in the init thread and it continue its
> > execution up to the task delete itself...
>
> OK. I've done my debugging part. I know what is wrong even if I still do
> not know why. When the ticker thread are created, 3 minimal context are
> created with _Thread_Handler as the entry point. When doing task delete,
> the first context is used (correct address, correct esp, ebp) when
> calling _Context_Switch but unfortunately, EIP is already corrupted.
> Note that I added a lot of printk wihtout making the problem disappear
> so it means, is surely not a wrong pointer thing...
>
> Now, the game is to find what part of the code corrupts it...
Thanks for the Bochs screen dump Eric. I wonder if someone is blowing
a stack. I noticed something that might help but don't know where it
would have happened. Notice the PC is 0x3216. That is very similar to
the flags register. Here are the initial values:
#define CPU_EFLAGS_INTERRUPTS_ON 0x00003202
#define CPU_EFLAGS_INTERRUPTS_OFF 0x00003002
I can think of 3 causes some of which don't make sense for a compiler
version change to break:
+ interrupt stack frame popped off wrong (weird for a compiler change)
+ interrupt stack not being restored in a function correctly
+ stack being blown -- EASY for a compiler change.
Try compiling with more stack space. Maybe something changed.
> --
> __
> / ` Eric Valette
> /-- __ o _. 6 rue Paul Le Flem
> (___, / (_(_(__ 35740 Pace
>
> Tel: +33 (0)2 99 85 26 76 Fax: +33 (0)2 99 85 26 76
> E-mail: eric.valette at free.fr
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list