[Bug sanitizer/124401] gcc.dg/ubsan/pointer-counted-by-bounds-124230.c etc. FAIL
ro at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 31 08:30:09 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124401
--- Comment #6 from Rainer Orth <ro at gcc dot gnu.org> ---
I've run the gcc.dg/ubsan/pointer-counted-by-bounds-124230.c test manually:
/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-124230.c:55:23:
runtime error: index 10 out of bounds for type 'int [*]'
Bus Error
LD_LIBRARY_PATH=../../../sparc-sun-solaris2.11/libsanitizer/ubsan/.libs
./pointer-counted-by-bounds-124230.exe
truss shows this is an unaligned access which cannot work on a strict-alignment
target like SPARC:
Incurred fault #5, FLTACCESS %pc = 0x0001125C
siginfo: SIGBUS BUS_ADRALN addr=0x00024EB2
Received signal #10, SIGBUS [default]
siginfo: SIGBUS BUS_ADRALN addr=0x00024EB2
vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-124230.c:55:23:
runtime error: index 10 out of bounds for type 'int [*]'
Thread 2 received signal SIGBUS, Bus error.
0x0001125c in main (argc=1, argv=0xffbfee24)
at
/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/ubsan/pointer-counted-by-bounds-124230.c:55
55 p_array_annotated->c[10] = 2;
1: x/i $pc
=> 0x1125c <main+112>: st %g2, [ %g1 ]
(gdb) p/x $g1
$19 = 0x24eb2
I wonder why it shouldn't be possible to find an appropriate SPARC system
inside Oracle. Even if so, there's always the cfarm: cfarm216 is a
Solaris/SPARC
system...
More information about the Gcc-bugs
mailing list