https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118449

            Bug ID: 118449
           Summary: [15 regression] libphobos.init_fini/custom_gc.d FAILs
           Product: gcc
           Version: 15.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: sparc*-sun-solaris2.11

Between 20250110 (bd28244ec92b9aac082f822987818ff1e11b67fd) and 20250111
(292be6817150ed11d599b6ac92269041ed62eb3a),
the libphobos.init_fini/custom_gc.d test regressed on Solaris/SPARC (32 and
64-bit):

+FAIL: libphobos.init_fini/custom_gc.d execution test

Thread 2 received signal SIGBUS, Bus error.
[Switching to Thread 1 (LWP 1)]
0x000b0558 in core.internal.gc.blockmeta.__setArrayAllocLengthImpl(ref
core.memory.BlkInfo_, uint, bool, const(TypeInfo), uint, uint) (info=..., 
    newlength=146, isshared=<optimized out>, 
    tinext=0x1061d4 <initializer for TypeInfo_a>, oldlength=4294967295, 
    typeInfoSize=0)
    at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/internal/gc/blockmeta.d:147
147             if (typeInfoSize)
1: x/i $pc
=> 0xb0558
<_D4core8internal2gc9blockmeta25__setArrayAllocLengthImplFNaNbKSQCj6memory8BlkInfo_kbxC8TypeInfokkZb+160>:
  sth  %i1, [ %g2 + %g1 ]
(gdb) bt
#0  0x000b0558 in core.internal.gc.blockmeta.__setArrayAllocLengthImpl(ref
core.memory.BlkInfo_, uint, bool, const(TypeInfo), uint, uint) (info=..., 
    newlength=146, isshared=<optimized out>, 
    tinext=0x1061d4 <initializer for TypeInfo_a>, oldlength=4294967295, 
    typeInfoSize=0)
    at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/internal/gc/blockmeta.d:147
#1  0x000907c8 in _d_arrayappendcTX (
    ti=0x105ae0 <initializer for TypeInfo_Aa>, px=..., n=<optimized out>)
    at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/lifetime.d:1527
#2  0x00084698 in core.internal.array.appending._d_arrayappendcTX!(char[],
char)._d_arrayappendcTX(scope return ref char[], uint) (px=..., n=1)
    at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/internal/array/appending.d:41
#3  0x000845c4 in D main ()
    at
/vol/gcc/src/hg/master/local/libphobos/testsuite/libphobos.init_fini/custom_gc.d:203
(gdb) p/x $g1
$1 = 0x10b
(gdb) p/x $g2
$2 = 0x11376c

The code now performs an unaligned access, which cannot work on a
strict-alignment target like SPARC.

Reply via email to