Thread overview
[Issue 24271] dmd exits with -4 on dub release (not sure what causes error, but have minimal repro code)
Dec 06, 2023
Basile-z
Dec 07, 2023
Nick Treleaven
Dec 08, 2023
anonymous4
December 06, 2023
https://issues.dlang.org/show_bug.cgi?id=24271

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |backend, ice

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
You need to compile -O to get the dmd SIGILL.

---
Program received signal SIGILL, Illegal instruction.
0x000055555596f8c6 in comsub(CodeBuilder&, elem*, unsigned int*) ()
Missing separate debuginfos, use: dnf debuginfo-install dmd-2.104.0-0.x86_64
(gdb) bt
#0  0x000055555596f8c6 in comsub(CodeBuilder&, elem*, unsigned int*) ()
#1  0x000055555596df78 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned
int) ()
#2  0x00005555559b6893 in orthxmm(CodeBuilder&, elem*, unsigned int*) ()
#3  0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned
int) ()
#4  0x00005555559b3e6d in xmmcnvt(CodeBuilder&, elem*, unsigned int*) ()
#5  0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned
int) ()
#6  0x000055555597986d in scodelem(CodeBuilder&, elem*, unsigned int*, unsigned
int, bool) ()
#7  0x00005555559af218 in xmmeq(CodeBuilder&, elem*, unsigned int, elem*,
elem*, unsigned int*) ()
#8  0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned
int) ()
--Type <RET> for more, q to quit, c to continue without paging--
#9  0x00005555559c3abb in outblkexitcode(CodeBuilder&, block*, int&, char
const*, Symbol**, unsigned int) ()
#10 0x00005555559d5be1 in blcodgen(block*) ()
#11 0x00005555559cd17d in codgen(Symbol*) ()
#12 0x00005555559e69ab in writefunc2(Symbol*) ()
#13 0x00005555557d2634 in toObjFile::ToObjFile::visit(FuncDeclaration*) ()
#14 0x00005555557d3961 in toObjFile::ToObjFile::visit(StructDeclaration*) ()
#15 0x00005555558d688e in genObjFile(Module*, bool) ()
#16 0x00005555558d2cba in dmd.glue.generateCodeAndWrite(dmd.dmodule.Module[],
const(char)*[], const(char)[], const(char)[], bool, bool, bool, bool, bool) ()
#17 0x00005555558f5e08 in dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) ()
#18 0x00005555558ff801 in D main ()

---

--
December 07, 2023
https://issues.dlang.org/show_bug.cgi?id=24271

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #2 from Nick Treleaven <nick@geany.org> ---
https://run.dlang.io/ with `-c -O` gives:
Up to      2.096.1: Success and no output
Since      2.097.2: Status -4 and no output

I get a different trace with DMD v2.106.0-rc.1-90-g16426601d6-dirty and `-O` on Linux nmt-pc 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux:

core.exception.AssertError@src/dmd/backend/cgcod.d(2282): Assertion failure
----------------
??:? _d_assertp [0x5595078b0ce4]
src/dmd/backend/cgcod.d:2282 nothrow @trusted void dmd.backend.cgcod.comsub(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, ref uint)
[0x55950781cee7]
src/dmd/backend/cgcod.d:2677 nothrow @trusted void
dmd.backend.cgcod.codelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, uint) [0x55950781d5b4]
src/dmd/backend/cgxmm.d:211 nothrow @trusted void dmd.backend.cgxmm.orthxmm(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint*)
[0x5595078146a6]
src/dmd/backend/cod2.d:918 nothrow @trusted void dmd.backend.cod2.cdmul(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint*)
[0x55950782fc22]
src/dmd/backend/cgcod.d:2717 nothrow @trusted void
dmd.backend.cgcod.codelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, uint) [0x55950781d805]
src/dmd/backend/cgxmm.d:490 nothrow @trusted void dmd.backend.cgxmm.xmmcnvt(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint*)
[0x55950781501f]
src/dmd/backend/cod4.d:3419 nothrow @trusted void dmd.backend.cod4.cdcnvt(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint*)
[0x5595077f0ee7]
src/dmd/backend/cgcod.d:2717 nothrow @trusted void
dmd.backend.cgcod.codelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, uint) [0x55950781d805]
src/dmd/backend/cgcod.d:2847 nothrow @trusted void
dmd.backend.cgcod.scodelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, uint, bool) [0x55950781dc5d]
src/dmd/backend/cgxmm.d:302 nothrow @trusted void dmd.backend.cgxmm.xmmeq(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint,
dmd.backend.el.elem*, dmd.backend.el.elem*, uint*) [0x5595078149fc]
src/dmd/backend/cod4.d:371 nothrow @trusted void dmd.backend.cod4.cdeq(ref
dmd.backend.codebuilder.CodeBuilder, dmd.backend.el.elem*, uint*)
[0x5595077e5c4a]
src/dmd/backend/cgcod.d:2717 nothrow @trusted void
dmd.backend.cgcod.codelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, uint) [0x55950781d805]
src/dmd/backend/cgen.d:199 nothrow @trusted void
dmd.backend.cgen.gencodelem(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.el.elem*, uint*, bool) [0x559507869227]
src/dmd/backend/cod3.d:957 nothrow @trusted void
dmd.backend.cod3.outblkexitcode(ref dmd.backend.codebuilder.CodeBuilder,
dmd.backend.cc.block*, ref int, const(char)*, dmd.backend.cc.Symbol**,
const(uint)) [0x5595078406e5]
src/dmd/backend/cgcod.d:1439 nothrow @trusted void
dmd.backend.cgcod.blcodgen(dmd.backend.cc.block*) [0x55950781b60b]
src/dmd/backend/cgcod.d:270 nothrow @trusted void
dmd.backend.cgcod.codgen(dmd.backend.cc.Symbol*) [0x559507818cf8]
src/dmd/backend/dout.d:1030 nothrow @trusted void
dmd.backend.dout.writefunc2(dmd.backend.cc.Symbol*) [0x5595077cc596]
src/dmd/backend/dout.d:850 nothrow @trusted void
dmd.backend.dout.writefunc(dmd.backend.cc.Symbol*) [0x5595077cbf12]
src/dmd/glue.d:1248 void
dmd.glue.FuncDeclaration_toObjFile(dmd.func.FuncDeclaration, bool)
[0x55950776a6bf]
src/dmd/toobj.d:325 _ZN9toObjFile9ToObjFile5visitEP15FuncDeclaration
[0x559507783d49]
src/dmd/func.d:2996 _ZN15FuncDeclaration6acceptEP7Visitor [0x55950768aee9]
src/dmd/toobj.d:554 void dmd.toobj.toObjFile(dmd.dsymbol.Dsymbol,
bool).ToObjFile.visit(dmd.dstruct.StructDeclaration).__lambda4!(dmd.dsymbol.Dsymbol).__lambda4(dmd.dsymbol.Dsymbol)
[0x559507784615]
src/dmd/dsymbol.d:104 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x5595075fdc3f]
src/dmd/toobj.d:554 _ZN9toObjFile9ToObjFile5visitEP17StructDeclaration
[0x559507784564]
src/dmd/dstruct.d:486 _ZN17StructDeclaration6acceptEP7Visitor [0x5595075fd4a5]
src/dmd/toobj.d:1045 void dmd.toobj.toObjFile(dmd.dsymbol.Dsymbol, bool)
[0x559507783cb0]
src/dmd/glue.d:576 void dmd.glue.genObjFile(dmd.dmodule.Module, bool)
[0x55950776870c]
src/dmd/glue.d:147 void dmd.glue.generateCodeAndWrite(dmd.dmodule.Module[],
const(char)*[], const(char)[], const(char)[], bool, bool, bool, bool, bool)
[0x559507766c88]
src/dmd/main.d:622 int dmd.main.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x55950757398d]
src/dmd/main.d:133 _Dmain [0x55950757229c]

--
December 08, 2023
https://issues.dlang.org/show_bug.cgi?id=24271

--- Comment #3 from anonymous4 <dfj1esp02@sneakemail.com> ---
That's just assert(0);

--