[Issue 1321] New: Deadlock when setting length for complex dynamic array type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 7 06:41:41 PDT 2007
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 at digitalmars.com
ReportedBy: d0ccrazy at 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;
}
--
More information about the Digitalmars-d-bugs
mailing list