Bug 20471 – TypeInfo_Array incorrectly initialized

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2019-12-30T15:33:31Z
Last change time
2024-12-13T19:06:38Z
Keywords
ice
Assigned to
No Owner
Creator
apham
Moved to GitHub: dmd#19653 →

Comments

Comment #0 by apz28 — 2019-12-30T15:33:31Z
Below is output from Visual D build log. Try to produce the minimum test case but not able to do so using dustmite. Hope below call-stack is enough for this bug report dmd-2.090.0-rc.1 set PATH=C:\Development\Microsoft\2019\Community\VC\bin;C:\Development\Microsoft\2019\Community\Common7\IDE;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Development\DLang\D\dmd2\windows\bin;%PATH% set DMD_LIB=C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\onecore\x86;C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86;"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86";"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86" set VCINSTALLDIR=C:\Development\Microsoft\2019\Community\VC\ set VCTOOLSINSTALLDIR=C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.24.28314\ set VSINSTALLDIR=C:\Development\Microsoft\2019\Community\ set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\ set WindowsSdkVersion=10.0.18362.0 set UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\ set UCRTVersion=10.0.18362.0 echo main.d >Debug\xml_new.build.rsp echo ..\..\xml_test_main\main_test.d >>Debug\xml_new.build.rsp echo ..\..\source\package.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_dlinklist.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_enumset.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_singleton.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_utf8.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_buffer.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_entity_table.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_exception.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_msg.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_new.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_object.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_parser.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_reader.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_string.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_unittest.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_util.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_writer.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_xpath.d >>Debug\xml_new.build.rsp "C:\Development\DLang\VisualD\pipedmd.exe" -deps Debug\xml_new.dep dmd -m32mscoff -g -gf -inline -debug -w -wi -unittest -cov -X -Xf"Debug\xml_new.json" -debug=noxmlTraceProfile -debug=noxmlTraceParser -debug=noxmlTraceXPathParser -c -of"Debug\xml_new.obj" @Debug\xml_new.build.rsp if %errorlevel% neq 0 goto reportError set LIB=C:\Development\DLang\D\dmd2\windows\bin\..\lib32mscoff echo. > F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo "Debug\xml_new.obj" /OUT:"Debug\xml_new.exe" /MAP:"Debug\xml_new.map" user32.lib >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo kernel32.lib >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo legacy_stdio_definitions.lib /LIBPATH:C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\onecore\x86 /LIBPATH:C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86 /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86" /DEBUG /PDB:"Debug\xml_new.pdb" /INCREMENTAL:NO /NOLOGO /noopttls /NODEFAULTLIB:libcmt libcmtd.lib /SUBSYSTEM:CONSOLE >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp "C:\Development\DLang\VisualD\mb2utf16.exe" F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp "C:\Development\DLang\VisualD\pipedmd.exe" -msmode -deps Debug\xml_new.lnkdep C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x86\link.exe @F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp if %errorlevel% neq 0 goto reportError if %errorlevel% neq 0 goto reportError del xml_new\*.tlog del xml_new\*.lst if not exist "Debug\xml_new.exe" (echo "Debug\xml_new.exe" not created! && goto reportError) goto noError :reportError echo Building Debug\xml_new.exe failed! :noError Output --- ERROR: This is a compiler bug. Please report it via https://issues.dlang.org/enter_bug.cgi with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction. --- DMD v2.090.0-rc.1-dirty predefs DigitalMars Windows CRuntime_Microsoft CppRuntime_Microsoft LittleEndian D_Version2 all D_InlineAsm D_InlineAsm_X86 X86 Win32 D_Coverage unittest assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary C:\Development\DLang\D\dmd2\windows\bin\dmd.exe version v2.090.0-rc.1-dirty config C:\Development\DLang\D\dmd2\windows\bin\sc.ini DFLAGS -IC:\Development\DLang\D\dmd2\windows\bin\..\..\src\phobos -IC:\Development\DLang\D\dmd2\windows\bin\..\..\src\druntime\import -L/OPT:NOICF --- core.exception.RangeError@dmd\root\array.d(226): Range violation ---------------- 0x00636B60 in const pure nothrow @safe immutable(char)[] object.TypeInfo_Array.toString() 0x00470C3A in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(3655) 0x00471C3E in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(4047) 0x004BBED9 in FuncDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\func.d(2512) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x004B7C90 in FuncDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\func.d(380) 0x004A8846 in ExpressionSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(6085) 0x00494831 in DotVarExp at C:\Users\vagrant\clones\dmd\src\dmd\expression.d(4692) 0x004B51BC in expressionSemantic at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(11292) 0x00558767 in dmd.expression.Expression dmd.typesem.dotExp(dmd.mtype.Type, dmd.dscope.Scope*, dmd.expression.Expression, dmd.identifier.Identifier, int).visitClass(dmd.mtype.TypeClass) at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(4346) 0x00554D84 in dmd.expression.Expression dmd.typesem.dotExp(dmd.mtype.Type, dmd.dscope.Scope*, dmd.expression.Expression, dmd.identifier.Identifier, int) at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(4361) 0x004B6527 in dmd.expression.Expression dmd.expressionsem.semanticY(dmd.expression.DotIdExp, dmd.dscope.Scope*, int) at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(11687) 0x00499D15 in dmd.expression.Expression dmd.expressionsem.resolveUFCS(dmd.dscope.Scope*, dmd.expression.CallExp) at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(542) 0x004A299A in ExpressionSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(4094) 0x00494EA9 in CallExp at C:\Users\vagrant\clones\dmd\src\dmd\expression.d(4949) 0x004B51BC in expressionSemantic at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(11292) 0x004B5051 in dmd.expression.Expression dmd.expressionsem.unaSemantic(dmd.expression.UnaExp, dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(11237) 0x004AA12B in ExpressionSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(6732) 0x0049520D in NotExp at C:\Users\vagrant\clones\dmd\src\dmd\expression.d(5118) 0x004B51BC in expressionSemantic at C:\Users\vagrant\clones\dmd\src\dmd\expressionsem.d(11292) 0x0053D077 in StatementSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\statementsem.d(2244) 0x005355F1 in IfStatement at C:\Users\vagrant\clones\dmd\src\dmd\statement.d(1404) 0x0053763C in statementSemantic at C:\Users\vagrant\clones\dmd\src\dmd\statementsem.d(127) 0x0053791E in StatementSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\statementsem.d(235) 0x00534BA5 in CompoundStatement at C:\Users\vagrant\clones\dmd\src\dmd\statement.d(938) 0x0053763C in statementSemantic at C:\Users\vagrant\clones\dmd\src\dmd\statementsem.d(127) 0x0052FC9C in Semantic3Visitor at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(585) 0x005325B0 in Semantic3Visitor at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(1407) 0x004BD9F1 in CtorDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\func.d(3478) 0x0052E981 in semantic3 at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(83) 0x005326C0 in Semantic3Visitor at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(1440) 0x0052AC51 in ParseTimeVisitor at C:\Users\vagrant\clones\dmd\src\dmd\parsetimevisitor.d(72) 0x0040E539 in ProtDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\attrib.d(635) 0x0052E981 in semantic3 at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(83) 0x00532785 in Semantic3Visitor at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(1466) 0x0052AD85 in ParseTimeVisitor at C:\Users\vagrant\clones\dmd\src\dmd\parsetimevisitor.d(86) 0x00434431 in ClassDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\dclass.d(1012) 0x0052E981 in semantic3 at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(83) 0x0052EABC in Semantic3Visitor at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(133) 0x004858F5 in TemplateInstance at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7328) 0x0052E981 in semantic3 at C:\Users\vagrant\clones\dmd\src\dmd\semantic3.d(83) 0x00475793 in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(5468) 0x00434431 in ClassDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\dclass.d(1012) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x00451308 in Module at C:\Users\vagrant\clones\dmd\src\dmd\dmodule.d(1330) 0x00485826 in void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*).symbolDg(dmd.dsymbol.Dsymbol) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7280) 0x004635A9 in void dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*, void delegate(dmd.dsymbol.Dsymbol)) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbol.d(100) 0x004857CC in void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7284) 0x00485874 in void dmd.dtemplate.TemplateInstance.tryExpandMembers(dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7300) 0x00476EF1 in void dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance, dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(6121) 0x0046ED0B in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(2817) 0x004858F5 in TemplateInstance at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7328) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x005543A7 in _D3dmd7typesem7resolveFCQw5mtype4TypeKxSQBm7globals3LocPSQCd6dscope5ScopePCQCv10expression10Expr833C188FF4EA48EC2A2C94C8E48B96BE at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(2851) 0x00553ADF in 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) at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(3100) 0x00551A3D in dmd.mtype.Type dmd.typesem.typeSemantic(dmd.mtype.Type, dmd.globals.Loc, dmd.dscope.Scope*).visitInstance(dmd.mtype.TypeInstance) at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(1651) 0x0054F2BB in typeSemantic at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(1966) 0x0047583F in pure @nogc @safe dmd.mtype.Type dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).__dgliteral2() at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(4934) 0x00477B01 in dmd.mtype.Type dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).resolveBase!(dmd.mtype.Type).resolveBase(lazy dmd.mtype.Type) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(4916) 0x00473E5A in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(4934) 0x00434431 in ClassDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\dclass.d(1012) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x00485821 in void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*).symbolDg(dmd.dsymbol.Dsymbol) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7280) 0x004635A9 in void dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*, void delegate(dmd.dsymbol.Dsymbol)) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbol.d(100) 0x004857CC in void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7284) 0x00485874 in void dmd.dtemplate.TemplateInstance.tryExpandMembers(dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7300) 0x00476EF1 in void dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance, dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(6121) 0x0046ED0B in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(2817) 0x004858F5 in TemplateInstance at C:\Users\vagrant\clones\dmd\src\dmd\dtemplate.d(7328) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x005543A7 in _D3dmd7typesem7resolveFCQw5mtype4TypeKxSQBm7globals3LocPSQCd6dscope5ScopePCQCv10expression10Expr833C188FF4EA48EC2A2C94C8E48B96BE at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(2851) 0x00553ADF in 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) at C:\Users\vagrant\clones\dmd\src\dmd\typesem.d(3100) 0x0050BD44 in TypeInstance at C:\Users\vagrant\clones\dmd\src\dmd\mtype.d(5346) 0x004777EE in void dmd.dsymbolsem.aliasSemantic(dmd.declaration.AliasDeclaration, dmd.dscope.Scope*) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(6439) 0x00469615 in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(747) 0x00435FB1 in AliasDeclaration at C:\Users\vagrant\clones\dmd\src\dmd\declaration.d(952) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x0046D751 in void dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dmodule.Module).__lambda2!(dmd.dsymbol.Dsymbol).__lambda2(dmd.dsymbol.Dsymbol) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(2247) 0x004635A9 in void dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*, void delegate(dmd.dsymbol.Dsymbol)) at C:\Users\vagrant\clones\dmd\src\dmd\dsymbol.d(100) 0x0046D6F4 in DsymbolSemanticVisitor at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(2250) 0x00451549 in Module at C:\Users\vagrant\clones\dmd\src\dmd\dmodule.d(1449) 0x00469011 in dsymbolSemantic at C:\Users\vagrant\clones\dmd\src\dmd\dsymbolsem.d(565) 0x004FD462 in int dmd.mars.tryMain(uint, const(char)**, ref dmd.globals.Param) at C:\Users\vagrant\clones\dmd\src\dmd\mars.d(564) 0x004FE54E in _Dmain at C:\Users\vagrant\clones\dmd\src\dmd\mars.d(944) 0x0063E7EB in void rt.dmain2._d_run_main2(char[][], uint, extern (C) int function(char[][])*).runAll().__lambda1() 0x0063E765 in void rt.dmain2._d_run_main2(char[][], uint, extern (C) int function(char[][])*).runAll() 0x0063E600 in _d_run_main2 0x0063B21A in _d_run_main 0x004FE4F5 in main at C:\Users\vagrant\clones\dmd\src\dmd\mars.d(893) 0x0065FCF1 in mainCRTStartup 0x75370419 in BaseThreadInitThunk 0x7784662D in RtlGetAppContainerNamedObjectPath 0x778465FD in RtlGetAppContainerNamedObjectPath Building Debug\xml_new.exe failed! dmd-2.088.1 set PATH=C:\Development\Microsoft\2019\Community\VC\bin;C:\Development\Microsoft\2019\Community\Common7\IDE;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Development\DLang\D\dmd2\windows\bin;%PATH% set DMD_LIB=C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\onecore\x86;C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86;"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86";"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86" set VCINSTALLDIR=C:\Development\Microsoft\2019\Community\VC\ set VCTOOLSINSTALLDIR=C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.24.28314\ set VSINSTALLDIR=C:\Development\Microsoft\2019\Community\ set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\ set WindowsSdkVersion=10.0.18362.0 set UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\ set UCRTVersion=10.0.18362.0 echo main.d >Debug\xml_new.build.rsp echo ..\..\xml_test_main\main_test.d >>Debug\xml_new.build.rsp echo ..\..\source\package.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_dlinklist.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_enumset.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_singleton.d >>Debug\xml_new.build.rsp echo ..\..\..\utl\source\utl_utf8.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_buffer.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_entity_table.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_exception.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_msg.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_new.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_object.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_parser.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_reader.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_string.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_unittest.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_util.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_writer.d >>Debug\xml_new.build.rsp echo ..\..\source\xml_xpath.d >>Debug\xml_new.build.rsp "C:\Development\DLang\VisualD\pipedmd.exe" -deps Debug\xml_new.dep dmd -m32mscoff -g -gf -inline -debug -w -wi -unittest -cov -X -Xf"Debug\xml_new.json" -debug=noxmlTraceProfile -debug=noxmlTraceParser -debug=noxmlTraceXPathParser -c -of"Debug\xml_new.obj" @Debug\xml_new.build.rsp if %errorlevel% neq 0 goto reportError set LIB=C:\Development\DLang\D\dmd2\windows\bin\..\lib32mscoff echo. > F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo "Debug\xml_new.obj" /OUT:"Debug\xml_new.exe" /MAP:"Debug\xml_new.map" user32.lib >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo kernel32.lib >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp echo legacy_stdio_definitions.lib /LIBPATH:C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\onecore\x86 /LIBPATH:C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86 /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86" /DEBUG /PDB:"Debug\xml_new.pdb" /INCREMENTAL:NO /NOLOGO /noopttls /NODEFAULTLIB:libcmt libcmtd.lib /SUBSYSTEM:CONSOLE >> F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp "C:\Development\DLang\VisualD\mb2utf16.exe" F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp "C:\Development\DLang\VisualD\pipedmd.exe" -msmode -deps Debug\xml_new.lnkdep C:\Development\Microsoft\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x86\link.exe @F:\DLang\std\xml\xml_new\xml_new\Debug\xml_new.link.rsp if %errorlevel% neq 0 goto reportError if %errorlevel% neq 0 goto reportError del xml_new\*.tlog del xml_new\*.lst if not exist "Debug\xml_new.exe" (echo "Debug\xml_new.exe" not created! && goto reportError) goto noError :reportError echo Building Debug\xml_new.exe failed! :noError Output --- ERROR: This is a compiler bug. Please report it via https://issues.dlang.org/enter_bug.cgi with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction. --- DMD v2.088.1-dirty predefs DigitalMars Windows CRuntime_Microsoft CppRuntime_Microsoft LittleEndian D_Version2 all D_InlineAsm D_InlineAsm_X86 X86 Win32 D_Coverage unittest assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary C:\Development\DLang\D\dmd2\windows\bin\dmd.exe version v2.088.1-dirty config C:\Development\DLang\D\dmd2\windows\bin\sc.ini DFLAGS -IC:\Development\DLang\D\dmd2\windows\bin\..\..\src\phobos -IC:\Development\DLang\D\dmd2\windows\bin\..\..\src\druntime\import -L/OPT:NOICF --- object.Error@(0): Access Violation ---------------- 0x00493338 0x004945F2 0x004F16F6 0x004D9363 0x005928D5 0x004C1DBE 0x0059F464 0x004BF76E 0x004D097E 0x004BF873 0x004BFB5E 0x004C7D84 0x004C9292 0x004EA252 0x00482855 0x004BD1AA 0x004EA252 0x77827903 in RtlReAllocateHeap 0x77824069 in RtlAllocateHeap Building Debug\xml_new.exe failed!
Comment #1 by apz28 — 2019-12-31T04:47:50Z
To make it compiles without issue -> Remove the "package.d" from compiling source Since the modules have object defined such class "XmlAttribute(S = string) : XmlNode!S". The package.d is just an import of all modules with some alias as below. Still not able to dustmite the problem public import pham.xml_exception; public import pham.xml_util; public import pham.xml_buffer; public import pham.xml_string; public import pham.xml_entity_table; public import pham.xml_new; public import pham.xml_parser; public import pham.xml_reader; public import pham.xml_writer; public import pham.xml_xpath; /** For utf8 encoded string */ alias XmlAttributeA = XmlAttribute!string; alias XmlCDataA = XmlCData!string; alias XmlCommentA = XmlComment!string; ... /** For utf16 encoded string */ alias XmlAttributeW = XmlAttribute!wstring; alias XmlCDataW = XmlCData!wstring; alias XmlCommentW = XmlComment!wstring; ...
Comment #2 by simen.kjaras — 2020-06-23T13:13:52Z
The leaf node in the stack trace is object.TypeInfo_Array.toString(), and looking at that code (https://github.com/dlang/druntime/blob/2cc13ead1e7e535ef8ebd1f600d4ffb508a93f98/src/object.d#L532): override string toString() const { return value.toString() ~ "[]"; } This will fail if value is null. Is it null though? unittest { auto a = typeid(""); import std.stdio; writeln(a.toString()); } > immutable(char)[] Doesn't look like it. unittest { auto a = typeid(""); assert(a.value !is null, "a.value is null!"); } > [unittest] a.value is null! Uhm... It seems something is special cased when handling TypeInfo, so that the code in toString() doesn't run at that point. For whatever reason, this short-circuiting doesn't happen inside DMD, and so it crashes.
Comment #3 by kinke — 2020-06-23T17:17:59Z
(In reply to Simen Kjaeraas from comment #2) > The leaf node in the stack trace is object.TypeInfo_Array.toString() I think that's a wrong lead due to a faulty stacktrace. The interesting bit is > core.exception.RangeError@dmd\root\array.d(226): Range violation That comes from an invalid index into a dmd.root.array.Array instance (https://github.com/dlang/dmd/blob/v2.090.0/src/dmd/root/array.d#L226). The next frame in the stacktrace seems reasonable, pointing to https://github.com/dlang/dmd/blob/v2.090.0/src/dmd/dsymbolsem.d#L3655: FuncDeclaration fdc = cd.vtbl[vi].isFuncDeclaration(); suggesting an invalid vi index.
Comment #4 by kinke — 2020-06-23T17:38:13Z
Btw, this issue showing up like this is only possible because the DMD 2.090.0 Windows builds were debug builds, that's why we have enabled bounds checks, debuginfos and even line infos.
Comment #5 by robert.schadek — 2024-12-13T19:06:38Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19653 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB