[Issue 23963] Illegal instruction / segfalult with -preview=dip1021

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 4 13:26:49 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23963

--- Comment #2 from Witold Baryluk <witold.baryluk+d at gmail.com> ---
First source code (in original top comment), produces different back trace in
gdb.

Providing for completeness

Program received signal SIGILL, Illegal instruction.
0x000055555589e0bd in dmd.dmangle.mangleParameter(dmd.mtype.Parameter,
dmd.common.outbuffer.OutBuffer*, ref dmd.dmangle.Backref) ()
(gdb) bt
#0  0x000055555589e0bd in dmd.dmangle.mangleParameter(dmd.mtype.Parameter,
dmd.common.outbuffer.OutBuffer*, ref dmd.dmangle.Backref) ()
#1  0x000055555589f0b3 in dmd.dmangle.mangleFuncType(dmd.mtype.TypeFunction,
dmd.mtype.TypeFunction, ubyte, dmd.mtype.Type, dmd.common.outbuffer.OutBuffer*,
ref dmd.dmangle.Backref).__foreachbody8(ulong, dmd.mtype.Parameter) ()
#2  0x000055555566d5bc in dmd.mtype.Parameter._foreachImpl(scope int(ulong,
dmd.mtype.Parameter, ulong, dmd.mtype.Parameter) delegate, ulong,
dmd.mtype.Parameter, ref ulong, dmd.mtype.Parameter) ()
#3  0x000055555566d3fc in dmd.dmangle.mangleFuncType(dmd.mtype.TypeFunction,
dmd.mtype.TypeFunction, ubyte, dmd.mtype.Type, dmd.common.outbuffer.OutBuffer*,
ref dmd.dmangle.Backref) ()
#4  0x00005555557e8dfb in Mangler::mangleDecl(Declaration*) ()
#5  0x00005555557e80fb in toSymbol::ToSymbol::visit(FuncDeclaration*) ()
#6  0x00005555557f9c00 in dmd.e2ir.toElem(dmd.expression.Expression,
dmd.toir.IRState*).visitSymbol(dmd.expression.SymbolExp) ()
#7  0x00005555557f40b4 in toElem(Expression*, IRState*) ()
#8  0x00005555558024f9 in dmd.e2ir.toElem(dmd.expression.Expression,
dmd.toir.IRState*).visitCall(dmd.expression.CallExp) ()
#9  0x00005555557f454a in toElem(Expression*, IRState*) ()
#10 0x00005555557f3bbc in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visitExp(dmd.statement.ExpStatement)
()
#11 0x00005555557ec82a in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visit.VisitStatement(dmd.statement.Statement)
    ()
#12 0x00005555557ec916 in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visit.VisitStatement(dmd.statement.Statement)
    ()
#13 0x00005555557ee9ea in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visit.VisitStatement(dmd.statement.Statement)
    ()
#14 0x00005555557ec82a in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visit.VisitStatement(dmd.statement.Statement)
    ()
#15 0x00005555557ec82a in dmd.s2ir.Statement_toIR(dmd.statement.Statement,
dmd.toir.IRState*,
dmd.stmtstate.StmtState!(dmd.backend.cc.block).StmtState*).visit.VisitStatement(dmd.statement.Statement)
    ()
#16 0x00005555557d2091 in toObjFile::ToObjFile::visit(FuncDeclaration*) ()
#17 0x00005555557cdf81 in toObjFile::ToObjFile::visit(TemplateInstance*) ()
#18 0x00005555558d688e in genObjFile(Module*, bool) ()
#19 0x00005555558d3392 in dmd.glue.generateCodeAndWrite(dmd.dmodule.Module[],
const(char)*[], const(char)[], const(char)[], bool, bool, bool, bool, bool) ()
#20 0x00005555558f5e08 in dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) ()
#21 0x00005555558ff801 in D main ()

--


More information about the Digitalmars-d-bugs mailing list