https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123288
Bug ID: 123288
Summary: Many 32-bit libphobos tests FAIL on Linux/SPARC
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Target: sparc64-unknown-linux-gnu
While testing a fix for PR d/123202 on Linux/sparc64, I found that many 32-bit
tests FAIL there. E.g. libphobos.phobos/std_math_hardware.d with the fix from
that PR applied:
$ ./std_math_hardware.exe
1 modules passed unittests
Illegal instruction ./std_math_hardware.exe
The stacktrace is like this:
Program received signal SIGILL, Illegal instruction.
0x00025cc8 in
rt.monitor_.destroyMutex(core.sys.posix.sys.types.pthread_mutex_t*)
(mtx=0xb6a68)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/monitor_.d:215
215 pthread_mutex_destroy(mtx) && assert(0);
1: x/i $pc
=> 0x25cc8
<_D2rt8monitor_12destroyMutexFNbNiPS4core3sys5posixQk5types15pthread_mutex_tZv+16>:
tne 5
(gdb) p mtx
$2 = (pthread_mutex_t *) 0xb6a68
(gdb) p *$2
$3 = {__size = '\000' <repeats 15 times>, "\001\377\377\377\377\000\000\000",
__align = 0}
(gdb) bt
#0 0x00025cc8 in
rt.monitor_.destroyMutex(core.sys.posix.sys.types.pthread_mutex_t*)
(mtx=0xb6a68)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/monitor_.d:215
#1 0x00025ce0 in rt.monitor_.deleteMonitor(rt.monitor_.Monitor*) (m=0xb6a58)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/monitor_.d:293
#2 0x00026678 in _d_monitordelete_nogc (
h=0xb4d1c <core.thread.osthread._mainThreadStore>)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/monitor_.d:90
#3 0x0002dae4 in
core.thread.threadbase.thread_term_tpl!(core.thread.osthread.Thread,
void[93]).thread_term_tpl(ref void[93]) (_mainThreadStore=...)
at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/thread/threadbase.d:793
#4 0x0002db5c in thread_term ()
at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/thread/osthread.d:2103
#5 0x000181e0 in rt_term ()
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/dmain2.d:156
#6 0x00018294 in runAll (__capture=__capture@entry=0xffffd874)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/dmain2.d:545
#7 0x00018574 in tryExec (__capture=0xffffd874, dg=...)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/dmain2.d:478
#8 _d_run_main2 (args=..., totalArgsLength=<optimized out>,
mainFunc=<optimized out>)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/dmain2.d:549
#9 0x000186cc in _d_run_main (argc=1, argv=<optimized out>,
mainFunc=0x16bd0 <D main>)
at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/dmain2.d:323
#10 0xf7cb4be0 in ?? () from /usr/lib32/libc.so.6
#11 0xf7cb4d1c in __libc_start_main () from /usr/lib32/libc.so.6
#12 0x00016ac4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I have not investigated further since this issue is pre-existing.