------- Comment #29 from joel at gcc dot gnu dot org  2008-04-02 15:08 -------
I have spent the morning debugging at the assembly level and I am nearly 100%
positive %ebx is getting corrupted.  It is correct before the call to       

STPO.Initialize_TCB (T, Success);

at s-taskin.adb and 0x0 upon return. There are ~2000 lines in the qemu.log 
between the two points so I have some reduction. 

I grep'ed the RTEMS source for references to ebx and I didn't see any which
were not in ISR or context switch code.  I did a run with no IO or interrupts
and got the same result.  At this point, I am looking for some subroutine that
isn't preserving ebx properly.


(In reply to comment #28)
> I did not notice that s-taprop for rtems was the posix version
> 
>    procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
>       Mutex_Attr : aliased pthread_mutexattr_t;
>       Result     : Interfaces.C.int;
>       Cond_Attr  : aliased pthread_condattr_t;
> 
>    begin
> ...
> 
>          if Result /= 0 then
>             Succeeded := False;
>             return;
>          end if;
> ...
>       if Result = 0 then
>          Succeeded := True;
>       else
>          if not Single_Lock then
>             Result := pthread_mutex_destroy (Self_ID.Common.LL.L'Access);
>             pragma Assert (Result = 0);
>          end if;
> 
>          Succeeded := False;
>       end if;
> ...
> 
> So it's now just a matter of finding which posix call in there fails.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35284

Reply via email to