Works OK here: $ sparc-rtems5-sis -leon3 -nouartrx -r -tlim 200 s -m 4 ./sparc-rtems5/c/leon3/testsuites/smptests/smpswitchextension01.exe
SIS - SPARC/RISCV instruction simulator 2.11, copyright Jiri Gaisler 1995 Bug-reports to j...@gaisler.se LEON3 emulation enabled, 4 cpus online, delta 50 clocks *** BEGIN OF TEST SMPSWITCHEXTENSION 1 *** *** TEST VERSION: 5.0.0.03fcbb15d24e2eec41bac9f5dee30bbf7dc888b8-modified *** TEST STATE: EXPECTED-PASS *** TEST BUILD: RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP *** TEST TOOLS: 7.4.0 20181206 (RTEMS 5, RSB c41b9d0df7e5b4a5056ca50c2534380a44e92769, Newlib 3e24fbf6f) toggler 0 toggles 174134 toggler 1 toggles 174133 extension 0 context switches 174437 extension 1 context switches 174164 extension 2 context switches 169718 extension switches 93650 *** END OF TEST SMPSWITCHEXTENSION 1 *** I will rebuild RSB and RTEMS from git HEAD and try it again ... Jiri. On 2/7/19 12:20 PM, Sebastian Huber wrote: > Hello, > > I get a NULL pointer exception in one of the tests: > > sparc-rtems5-sis -leon3 -nouartrx -r -tlim 200 s -m 4 smpswitchextension01.exe > > SIS - SPARC/RISCV instruction simulator 2.11, copyright Jiri Gaisler 1995 > Bug-reports to j...@gaisler.se > > LEON3 emulation enabled, 4 cpus online, delta 50 clocks > > Waking CPU 1 > > > *** BEGIN OF TEST SMPSWITCHEXTENSION 1 *** > *** TEST VERSION: 5.0.0.e105ead93f8e7addf1c6bba731a1eb4da99f2e85 > *** TEST STATE: EXPECTED-PASS > *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP > *** TEST TOOLS: 7.4.0 20181206 (RTEMS 5, RSB > c41b9d0df7e5b4a5056ca50c2534380a44e92769, Newlib 3e24fbf6f) > Unexpected trap ( 2) at address 0x00000000 > illegal instruction > IU in error mode (0) > 11360600 4001d9e0 12bffffe bne 0x000000004001d9d8 > > I tried to debug this issue: > > sparc-rtems5-gdb smpswitchextension01.exe > GNU gdb (GDB) 8.2.1 > Copyright (C) 2018 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-rtems5". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > No symbol table is loaded. Use the "file" command. > Reading symbols from smpswitchextension01.exe...done. > (gdb) tar sim -leon3 -m 4 > Connected to the simulator. > (gdb) load > (gdb) b *0 > Breakpoint 1 at 0x0 > (gdb) r > Starting program: > /build/git-build/b-leon3/sparc-rtems5/c/leon3/testsuites/smptests/smpswitchextension01.exe > Waking CPU 1 > > > *** BEGIN OF TEST SMPSWITCHEXTENSION 1 *** > *** TEST VERSION: 5.0.0.e105ead93f8e7addf1c6bba731a1eb4da99f2e85 > *** TEST STATE: EXPECTED-PASS > *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP > *** TEST TOOLS: 7.4.0 20181206 (RTEMS 5, RSB > c41b9d0df7e5b4a5056ca50c2534380a44e92769, Newlib 3e24fbf6f) > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x40007070 in _API_Mutex_Is_owner (the_mutex=0x40026598 > <_RTEMS_Allocator_Mutex>) at > /home/EB/sebastian_h/git-rtems-5/c/src/../../cpukit/score/src/apimutexisowner.c:25 > 25 return the_mutex->Mutex._Mutex._Queue._owner == > _Thread_Get_executing(); > (gdb) disas > Dump of assembler code for function _API_Mutex_Is_owner: > 0x4000706c <+0>: ld [ %o0 + 0xc ], %g1 > => 0x40007070 <+4>: ld [ %g6 + 0x20 ], %g2 > 0x40007074 <+8>: xor %g1, %g2, %g1 > 0x40007078 <+12>: cmp %g0, %g1 > 0x4000707c <+16>: retl > 0x40007080 <+20>: subx %g0, -1, %o0 > End of assembler dump. > (gdb) info registers > g0 0x0 0 > g1 0x40027688 1073903240 > g2 0x40029b54 1073912660 > g3 0x8e 142 > g4 0x40029b54 1073912660 > g5 0x0 0 > g6 0x40029640 1073911360 > g7 0x0 0 > o0 0x40026598 1073898904 > o1 0x4002f300 1073935104 > o2 0x0 0 > o3 0x40023800 1073887232 > o4 0x0 0 > o5 0x40029640 1073911360 > sp 0x4002f2a8 0x4002f2a8 > o7 0x40008444 1073775684 > l0 0xf3400fc7 -213905465 > l1 0x4001add8 1073851864 > l2 0x4001addc 1073851868 > l3 0xf34000c7 -213909305 > l4 0x0 0 > l5 0x0 0 > l6 0x0 0 > l7 0x0 0 > i0 0x400263b4 1073898420 > i1 0x400269cc 1073899980 > i2 0x0 0 > i3 0x40029c00 1073912832 > i4 0x40029b50 1073912656 > i5 0x40029b50 1073912656 > fp 0x4002f308 0x4002f308 > i7 0x4001170c 1073813260 > y 0x588 1416 > psr 0xf34000e7 [ ET PS S ] > wim 0x8 8 > tbr 0x400008a0 1073744032 > pc 0x40007070 0x40007070 <_API_Mutex_Is_owner+4> > npc 0x40007074 0x40007074 <_API_Mutex_Is_owner+8> > fsr 0x0 [ ] > csr 0x0 0 > > It seems the debugger doesn't stop at address 0, but somewhere else. > _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel