[Issue 21008] dmd segfaults because of __traits(getMember, ...) and virtual function overriding

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 5 14:41:54 UTC 2020


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

--- Comment #2 from moonlightsentinel at disroot.org ---
Slightly different stack trace for current HEAD
(3c8b519cbc30935e0b66d97d04663156bbd3dc63):

core.exception.RangeError at dmd/root/array.d(259): Range violation
----------------
??:? _d_arrayboundsp [0x7f1929da2a75]
dmd/root/array.d:259 _ZN5ArrayIP7DsymbolEixEm [0x7f1929be65d6]
dmd/dsymbolsem.d:3724
_ZN22DsymbolSemanticVisitor23funcDeclarationSemanticEP15FuncDeclaration
[0x7f1929b55d7e]
dmd/dsymbolsem.d:4114 _ZN22DsymbolSemanticVisitor5visitEP15FuncDeclaration
[0x7f1929b57194]
dmd/func.d:2558 _ZN15FuncDeclaration6acceptEP7Visitor [0x7f1929bbd8e5]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/typesem.d:4305 dmd.expression.Expression dmd.typesem.dotExp(dmd.mtype.Type,
dmd.dscope.Scope*, dmd.expression.Expression, dmd.identifier.Identifier,
int).visitClass(dmd.mtype.TypeClass) [0x7f1929c8fe5a]
dmd/typesem.d:4350 dmd.expression.Expression dmd.typesem.dotExp(dmd.mtype.Type,
dmd.dscope.Scope*, dmd.expression.Expression, dmd.identifier.Identifier, int)
[0x7f1929c8b346]
dmd/expressionsem.d:11890 dmd.expression.Expression
dmd.expressionsem.semanticY(dmd.expression.DotIdExp, dmd.dscope.Scope*, int)
[0x7f1929bb656f]
dmd/expressionsem.d:6151 _ZN25ExpressionSemanticVisitor5visitEP8DotIdExp
[0x7f1929ba4b55]
dmd/expression.d:4574 _ZN8DotIdExp6acceptEP7Visitor [0x7f1929b8a59d]
dmd/expressionsem.d:11488 _Z18expressionSemanticP10ExpressionP5Scope
[0x7f1929bb4d2f]
dmd/traits.d:1002 dmd.expression.Expression
dmd.traits.semanticTraits(dmd.expression.TraitsExp, dmd.dscope.Scope*)
[0x7f1929c7e029]
dmd/expressionsem.d:5288 _ZN25ExpressionSemanticVisitor5visitEP9TraitsExp
[0x7f1929ba1b6c]
dmd/expression.d:4009 _ZN9TraitsExp6acceptEP7Visitor [0x7f1929b88dd1]
dmd/expressionsem.d:11488 _Z18expressionSemanticP10ExpressionP5Scope
[0x7f1929bb4d2f]
dmd/statementsem.d:186 _ZN24StatementSemanticVisitor5visitEP12ExpStatement
[0x7f1929c669d1]
dmd/statement.d:750 _ZN12ExpStatement6acceptEP7Visitor [0x7f1929c6243d]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/statementsem.d:244 _ZN24StatementSemanticVisitor5visitEP17CompoundStatement
[0x7f1929c66c93]
dmd/statement.d:938 _ZN17CompoundStatement6acceptEP7Visitor [0x7f1929c62cb9]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/statementsem.d:445 _ZN24StatementSemanticVisitor5visitEP14ScopeStatement
[0x7f1929c677e1]
dmd/statement.d:1045 _ZN14ScopeStatement6acceptEP7Visitor [0x7f1929c630b9]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/statementsem.d:419
_ZN24StatementSemanticVisitor5visitEP21UnrolledLoopStatement [0x7f1929c676b1]
dmd/statement.d:1003 _ZN21UnrolledLoopStatement6acceptEP7Visitor
[0x7f1929c62f59]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/statementsem.d:1165 _ZN24StatementSemanticVisitor5visitEP16ForeachStatement
[0x7f1929c68607]
dmd/statement.d:1320 _ZN16ForeachStatement6acceptEP7Visitor [0x7f1929c638b1]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/statementsem.d:244 _ZN24StatementSemanticVisitor5visitEP17CompoundStatement
[0x7f1929c66c93]
dmd/statement.d:938 _ZN17CompoundStatement6acceptEP7Visitor [0x7f1929c62cb9]
dmd/statementsem.d:131 _Z17statementSemanticP9StatementP5Scope [0x7f1929c668bb]
dmd/semantic3.d:575 _ZN16Semantic3Visitor5visitEP15FuncDeclaration
[0x7f1929c5c712]
dmd/func.d:2558 _ZN15FuncDeclaration6acceptEP7Visitor [0x7f1929bbd8e5]
dmd/semantic3.d:81 _Z9semantic3P7DsymbolP5Scope [0x7f1929c5b14d]
dmd/func.d:455 _ZN15FuncDeclaration17functionSemantic3Ev [0x7f1929bb85b1]
dmd/func.d:429 _ZN15FuncDeclaration16functionSemanticEv [0x7f1929bb84c6]
dmd/expressionsem.d:918 dmd.expression.Expression
dmd.expressionsem.symbolToExp(dmd.dsymbol.Dsymbol, ref const(dmd.globals.Loc),
dmd.dscope.Scope*, bool) [0x7f1929b932c8]
dmd/expressionsem.d:3331 _ZN25ExpressionSemanticVisitor5visitEP8ScopeExp
[0x7f1929b9a813]
dmd/expression.d:3320 _ZN8ScopeExp6acceptEP7Visitor [0x7f1929b872f9]
dmd/expressionsem.d:11488 _Z18expressionSemanticP10ExpressionP5Scope
[0x7f1929bb4d2f]
dmd/expressionsem.d:101 bool dmd.expressionsem.expressionsToString(ref
dmd.root.outbuffer.OutBuffer, dmd.dscope.Scope*,
dmd.root.array.Array!(dmd.expression.Expression).Array*) [0x7f1929b90e62]
dmd/dsymbolsem.d:2101
_ZN22DsymbolSemanticVisitor9compileItEP18CompileDeclaration [0x7f1929b50ef4]
dmd/dsymbolsem.d:2131 _ZN22DsymbolSemanticVisitor5visitEP18CompileDeclaration
[0x7f1929b5115f]
dmd/attrib.d:1344 _ZN18CompileDeclaration6acceptEP7Visitor [0x7f1929ad31a5]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/dsymbolsem.d:5369 void
dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).__lambda10!(dmd.dsymbol.Dsymbol).__lambda10(dmd.dsymbol.Dsymbol)
[0x7f1929b5bf0f]
dmd/dsymbol.d:99 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x7f1929b4424f]
dmd/dsymbolsem.d:5369 _ZN22DsymbolSemanticVisitor5visitEP16ClassDeclaration
[0x7f1929b5b195]
dmd/dclass.d:993 _ZN16ClassDeclaration6acceptEP7Visitor [0x7f1929b0672d]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/dtemplate.d:7392 void
dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*).symbolDg(dmd.dsymbol.Dsymbol)
[0x7f1929b70d04]
dmd/dsymbol.d:99 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x7f1929b4424f]
dmd/dtemplate.d:7397 void
dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*)
[0x7f1929b70c90]
dmd/dtemplate.d:7412 void
dmd.dtemplate.TemplateInstance.tryExpandMembers(dmd.dscope.Scope*)
[0x7f1929b70d6e]
dmd/dsymbolsem.d:6205 void
dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance,
dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*)
[0x7f1929b5d99c]
dmd/dsymbolsem.d:2829 _ZN22DsymbolSemanticVisitor5visitEP16TemplateInstance
[0x7f1929b53356]
dmd/dtemplate.d:7441 _ZN16TemplateInstance6acceptEP7Visitor [0x7f1929b70e29]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/typesem.d:2831 void dmd.typesem.resolve(dmd.mtype.Type, ref
const(dmd.globals.Loc), dmd.dscope.Scope*, dmd.expression.Expression*,
dmd.mtype.Type*, dmd.dsymbol.Dsymbol*,
bool).visitInstance(dmd.mtype.TypeInstance) [0x7f1929c8a622]
dmd/typesem.d:3091 void dmd.typesem.resolve(dmd.mtype.Type, ref
const(dmd.globals.Loc), dmd.dscope.Scope*, dmd.expression.Expression*,
dmd.mtype.Type*, dmd.dsymbol.Dsymbol*, bool) [0x7f1929c89a46]
dmd/typesem.d:1652 dmd.mtype.Type dmd.typesem.typeSemantic(dmd.mtype.Type, ref
const(dmd.globals.Loc),
dmd.dscope.Scope*).visitInstance(dmd.mtype.TypeInstance) [0x7f1929c87294]
dmd/typesem.d:1945 _Z12typeSemanticP4TypeRK3LocP5Scope [0x7f1929c84237]
dmd/dsymbolsem.d:5010 pure @nogc @safe dmd.mtype.Type
dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).__dgliteral3()
[0x7f1929b5bded]
dmd/dsymbolsem.d:4992 dmd.mtype.Type
dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).resolveBase!(dmd.mtype.Type).resolveBase(lazy
dmd.mtype.Type) [0x7f1929b5ebd4]
dmd/dsymbolsem.d:5010 _ZN22DsymbolSemanticVisitor5visitEP16ClassDeclaration
[0x7f1929b59cd7]
dmd/dclass.d:993 _ZN16ClassDeclaration6acceptEP7Visitor [0x7f1929b0672d]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/dsymbolsem.d:2259 void
dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dmodule.Module).__lambda2!(dmd.dsymbol.Dsymbol).__lambda2(dmd.dsymbol.Dsymbol)
[0x7f1929b51718]
dmd/dsymbol.d:99 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x7f1929b4424f]
dmd/dsymbolsem.d:2256 _ZN22DsymbolSemanticVisitor5visitEP6Module
[0x7f1929b516a7]
dmd/dmodule.d:1462 _ZN6Module6acceptEP7Visitor [0x7f1929b2c1e1]
dmd/dsymbolsem.d:564 _Z15dsymbolSemanticP7DsymbolP5Scope [0x7f1929b4be75]
dmd/mars.d:565 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x7f1929c14a36]
dmd/mars.d:952 _Dmain [0x7f1929c162ff]

--


More information about the Digitalmars-d-bugs mailing list