D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4992 - ICE(glue.c) or segfault: using int[new]
Summary: ICE(glue.c) or segfault: using int[new]
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code, patch
Depends on:
Blocks:
 
Reported: 2010-10-04 13:02 UTC by Don
Modified: 2010-10-05 02:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2010-10-04 13:02:13 UTC
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)
Comment 1 Walter Bright 2010-10-05 02:34:15 UTC
http://www.dsource.org/projects/dmd/changeset/704