Test Failures on erc32 (sis)

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Dec 2 10:59:47 UTC 2016



On 02/12/16 11:10, Jiri Gaisler wrote:
>
> On 01/12/16 17:43, Joel Sherrill wrote:
>> Hi
>>
>> erc32 has a couple of test failures on master:
>>
>>
>> *** BEGIN OF TEST PSXSPIN 1 ***
>> pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK
>> pthread_spin_destroy( &spinlock ) -- OK
>> pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED ) -- OK
>> pthread_spin_destroy( &spinlock ) -- OK
>> pthread_spin_init( &spinlock, 0x1234 ) -- OK
>> pthread_spin_init( &spinlock2, 0 ) -- OK
>> pthread_spin_lock( &spinlock ) -- OK
>> Unexpected trap ( 9) at address 0x02008758
>> data access exception at 0x00000008
>>
>>
>> *** BEGIN OF TEST SPCONTEXT 1 ***
>> Test configuration N N N... done
>> Test configuration N N F...
>> ../../../../../../../rtems/c/src/../../testsuites/sptests/spcontext01/init.c:
>> 44 0
>>
>> I have not had a chance to check other BSPs yet.
>>
>> Thanks.
>>
>> --joel
>>
> Could it be a gcc/binutils problem? Software trap 5 is called to set/get
> the interrupt level of a spinlock, but RTEMS's sparc.h does not mention
> this trap at all. In old SunOS, software trap 5 (0x85) was 'range
> check', whatever that meant ...

No, this was a NULL pointer access:

https://git.rtems.org/rtems/commit/?id=aadd318cd92e42839cf86260e1085f2953113180

GCC generates a trap 5 instruction in case it detects certain kinds of 
undefined behaviour, e.g.

void f(void)
{
   int *i = 0;
   *i = 0;
}

sparc-rtems4.12-gcc -S -O2 -o - test.c
         .file   "test.c"
         .section        ".text"
         .align 4
         .global f
         .type   f, #function
         .proc   020
f:
         st      %g0, [%g0+0]
         ta      5
         .size   f, .-f
         .ident  "GCC: (GNU) 6.1.1 20160526"

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list