Jump to page: 1 2
Thread overview
[Issue 22729] dmd crushed and asked to report a bug
Feb 03, 2022
Alexey
Feb 04, 2022
Alexey
Feb 04, 2022
Alexey
Feb 05, 2022
Basile-z
Feb 06, 2022
Alexey
Feb 08, 2022
Alexey
Feb 08, 2022
Alexey
Apr 01, 2022
Alexey
Apr 01, 2022
Alexey
[Issue 22729] ICE: Invalid array access for invalid interface definition
Dec 17, 2022
Iain Buclaw
Jun 21, 2023
Dlang Bot
Jun 21, 2023
Dlang Bot
Jul 02, 2023
Dlang Bot
February 03, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #1 from Alexey <animuspexus@protonmail.com> ---
trying to build same code with dub build --compiler=ldc2 leads to:
---
/home/animus/dpath_work/dtk/source/dtk/platforms/sdl_desktop/utils.d(275,51):
Error: template `std.string.fromStringz` cannot deduce function from argument
types `!()(char[32])`, candidates are:
/usr/lib/ldc/x86_64-redhat-linux-gnu/include/d/std/string.d(222,15):
`fromStringz(Char)(return scope inout(Char)* cString)`

--
February 04, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #2 from Alexey <animuspexus@protonmail.com> ---
fixed fromStringz ldc2 related error in my code. ldc2 now too crushes with some similar backtrace https://github.com/AnimusPEXUS/dtk/commit/fbd2dc1879b9259465789d9c5c8ae6ea3f46ea85

--
February 04, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #3 from Alexey <animuspexus@protonmail.com> ---
copying here dmd and ldc2 crush messages

dmd
==============================================================
core.exception.AssertError@/home/animus/dlang/d_v2.098.1/dmd/src/dmd/root/array.d(310):
Assertion failure
----------------
??:? _d_assertp [0x90e0d4]
??:? inout pure nothrow @nogc @safe inout(dmd.dsymbol.Dsymbol)[]
dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array.opSlice(ulong, ulong)
[0x69ac96]
??:? void
dmd.semantic2.Semantic2Visitor.visit(dmd.dclass.ClassDeclaration).checkInterfaceImplementations(dmd.dclass.ClassDeclaration)
[0x77f6ba]
??:? _ZN16Semantic2Visitor5visitEP16ClassDeclaration [0x77f61b]
??:? _ZN16ClassDeclaration6acceptEP7Visitor [0x620fd9]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Import [0x77f0f0]
??:? _ZN6Import6acceptEP7Visitor [0x62918e]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x77eba1]
??:? _ZN6Module6acceptEP7Visitor [0x647e75]
??:? _Z9semantic2P7DsymbolP5Scope [0x77e071]
??:? int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param)
[0x5d11fe]
??:? _Dmain [0x5d2fc9]
dmd failed with exit code 1.
==============================================================

ldc2
==============================================================
core.exception.RangeError@/builddir/build/BUILD/ldc-1.27.1-src/dmd/root/array.d(311):
Range violation
----------------
??:? onRangeError [0x7fd7ec15cd98]
??:? _d_arraybounds [0x7fd7ec15d277]
??:? void
dmd.semantic2.Semantic2Visitor.visit(dmd.dclass.ClassDeclaration).checkInterfaceImplementations(dmd.dclass.ClassDeclaration)
[0x5e7a3f]
??:?
_ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP16ClassDeclaration
[0x53b1b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Import
[0x5398b7]
??:? _ZN16Semantic2Visitor5visitEP6Module [0x53a78b]
??:? _ZN24SemanticTimeTraceVisitorIP16Semantic2VisitorE5visitEP6Module
[0x53a6a9]
??:? _Z13mars_mainBodyR5ParamR5ArrayIPKcES5_ [0x624473]
??:? _Z7cppmainv [0x82c101]
??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int
function(char[][])*).runAll() [0x7fd7ec19118b]
??:? _d_run_main2 [0x7fd7ec190fa4]
??:? _d_run_main [0x7fd7ec190dfd]
??:? main [0x5240cc]
??:? [0x7fd7ebbbe55f]
??:? __libc_start_main [0x7fd7ebbbe60b]
??:? _start [0x526474]
ldc2 failed with exit code 1.
==============================================================

--
February 05, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |b2.temp@gmx.com
           Severity|enhancement                 |critical

--- Comment #4 from Basile-z <b2.temp@gmx.com> ---
To help reducing you can try 1. mocking the C library in D, 2. reproduce the bug with that fake tk. Then you can dustmite the whole.

Also try with older DMD versions, e.g to see if it's a regression. That can help to spot the issue.

--
February 06, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #5 from Alexey <animuspexus@protonmail.com> ---
tried to use dustmade. maybe I use it incorrectly, but it runned for some 5-6 hours and deleted all files in directory and left only dub.json. I runned it like this: `dustmite . 'dub build' > ../dust_log 2>&1` inside of dtk dir.

judging from backtraces I've provided earlier, my guess is what's going on is some circular-recursive interface check. probably, best tactic would be to add some debug printfs into those Semantic.Visitor.visit.ClassDeclaration/Class.Declaration.accept.Visitor functions and probably add some context so those functions could detect if new recursion loop iteration is trying to start. but I don't think I'm good enough to mess with dmd code.

--
February 08, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #6 from Alexey <animuspexus@protonmail.com> ---
my project is compilable again. again, can't tell what exactly changed so bug is gone. I think this is somehow connected with ContainerableI, which I created and added just before bug appearance. thou when I simply renamed ContainerableI.d to ContainerableI.d_ and done minimal removal of ContainerableI form code dmd were still crushing.


compiles: https://github.com/AnimusPEXUS/dtk/commit/6f90ca7486c7712af3fb77cf9168b501788b8cb6

next commit, first time bug appearance, added some new ContainerableI
interface:
https://github.com/AnimusPEXUS/dtk/commit/e75b7a4e1ff95f6cbc09a598cc05755bd97296d0

reworked code to remove ContainerableI, but this is not compilable yet: https://github.com/AnimusPEXUS/dtk/commit/379f53020fd62e43bd3130de89f9cc2f09c3d68a

some more work and first successful compilation after bug: https://github.com/AnimusPEXUS/dtk/commit/57b54403e4a0381c50dd5e7e70aca55b78529d0c

--
February 08, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #7 from Alexey <animuspexus@protonmail.com> ---
also I somewhat suspicious about `return tuple(cast(WidgetI)this, point);`
lines in crush-commit

--
April 01, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #8 from Alexey <animuspexus@protonmail.com> ---
got same bug again. I think this is about some mixture of interface recursion
and mixins. still couldn't triangulate the problem, but it disappears if I
comment out ': ContainerFunctionSetI' text in  source/dtk/interfaces/WidgetI.d
at line 24 . commited code with bug is here :
https://github.com/AnimusPEXUS/dtk/commit/2a415b4b5701dd7d62b3ec916f077b0fe56935cb

terminal bug report message:
-----------------
---
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.099.0
predefs   SDL_204 BindSDL_Static SDL_Image BindFT_Static
DTK_PLATFORM_SDL_DESKTOP Have_dtk Have_fontconfig Have_bindbc_freetype
Have_bindbc_sdl Have_observable Have_bindbc_loader Have_vibe_core
Have_eventcore Have_stdx_allocator EventcoreEpollDriver Have_taggedalgebraic
DigitalMars LittleEndian D_Version2 all D_SIMD Posix ELFv1 linux CRuntime_Glibc
CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_PreConditions
D_PostConditions D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary    dmd
version   v2.099.0
config    /home/animus/dlang/d_v2.099.0/dmd/generated/linux/release/64/dmd.conf
DFLAGS
-I/home/animus/dlang/d_v2.099.0/dmd/generated/linux/release/64/../../../../../druntime/import
-I/home/animus/dlang/d_v2.099.0/dmd/generated/linux/release/64/../../../../../phobos
-L-L/home/animus/dlang/d_v2.099.0/dmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64
-L--export-dynamic -fPIC
---
core.exception.AssertError@/home/animus/dlang/d_v2.099.0/dmd/src/dmd/root/array.d(310): Assertion failure
----------------
??:? _d_assertp [0x9280f8]
/home/animus/dlang/d_v2.099.0/dmd/src/dmd/root/array.d:310 inout pure nothrow
@nogc @safe inout(dmd.dsymbol.Dsymbol)[]
dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array.opSlice(ulong, ulong)
[0x5c9186]
src/dmd/semantic2.d:626 void
dmd.semantic2.Semantic2Visitor.visit(dmd.dclass.ClassDeclaration).checkInterfaceImplementations(dmd.dclass.ClassDeclaration)
[0x786bae]
src/dmd/semantic2.d:668 _ZN16Semantic2Visitor5visitEP16ClassDeclaration
[0x786b0f]
src/dmd/dclass.d:1001 _ZN16ClassDeclaration6acceptEP7Visitor [0x65b045]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:475 _ZN16Semantic2Visitor5visitEP6Import [0x7865fc]
src/dmd/dimport.d:356 _ZN6Import6acceptEP7Visitor [0x6630fe]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/semantic2.d:337 _ZN16Semantic2Visitor5visitEP6Module [0x7860c0]
src/dmd/dmodule.d:1476 _ZN6Module6acceptEP7Visitor [0x681bd9]
src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x7855d5]
src/dmd/mars.d:470 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x60a16c]
src/dmd/mars.d:1002 _Dmain [0x60bf8d]
dmd failed with exit code 1.

--
April 01, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

--- Comment #9 from Alexey <animuspexus@protonmail.com> ---
dustmite - doesn't helps

--
April 02, 2022
https://issues.dlang.org/show_bug.cgi?id=22729

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel@disroot.o
                   |                            |rg

--- Comment #10 from moonlightsentinel@disroot.org ---
Reduction:

interface ContainerFunctionSetI
{
    Tuple!(WidgetI) getChildAtPosition;
}

interface WidgetI : ContainerFunctionSetI
{
}

class Form : ContainerI, WidgetI
{
}

template Tuple(Specs)
{
    enum areCompatibleTuples(Tup2)(Tuple tup1, Tup2 tup2)
    {
        tup1.field == tup2;
    }

    struct Tuple
    {
        Specs field;

        bool opEquals(R)(R) if (areCompatibleTuples!R)
        {
        }

    }
}

--
« First   ‹ Prev
1 2