www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1321] New: Deadlock when setting length for complex dynamic array type

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1321

           Summary: Deadlock when setting length for complex dynamic array
                    type
           Product: D
           Version: 1.018
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: d0ccrazy web.de


The following code produces a deadlock at runtime (100% cpu) for DMD 1.018 and
some earlier versions I tested (1.015, 1.017):

int main(char[][] args)
{
    int[char[]][] a;
    a.length = 1;
    return 0;
}


However, the following works,

int main(char[][] args)
{
    int[char[]][1] a;
    a[0]["test"] = 1;
    return 0;
}

as does this:

struct S {
    int[char[]] v;
}
int main(char[][] args)
{
    S[] a;
    a.length = 1;
    a[0].v["test"] = 1;
    return 0;
}


-- 
Jul 07 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1321


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE







*** This bug has been marked as a duplicate of 929 ***


-- 
Jul 07 2007