Bug 4992 – ICE(glue.c) or segfault: using int[new]
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-10-04T13:02:00Z
Last change time
2010-10-05T02:34:15Z
Keywords
ice-on-invalid-code, patch
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2010-10-04T13:02:13Z
TEST CASE:
// ICE(glue.c)
int[new] crash4992;
// Segfault
int crash4992b[new];
PATCH: Support for T[new] needs to be removed from the parser.
mtype.c, Remove lines 2414 - 2419 from parseBasicType2().
and also from
isDeclarator()
parseDeclarator()
They are easily found by searching for TOKnew.
Each section begins with something like:
- else if (token.value == TOKnew && peekNext() == TOKrbracket)