Bug 15855 – "a[{for" causes dmd to segfault

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-31T01:47:00Z
Last change time
2016-10-01T11:45:53Z
Keywords
ice, pull
Assigned to
nobody
Creator
initrd.gz

Comments

Comment #0 by initrd.gz — 2016-03-31T01:47:56Z
Test file: a[{for The first character can be replaced with any valid identifier. Compiling: col@col-vm ~> dmd -c test.d test.d(2): Error: found 'EOF' when expecting '(' test.d(2): Error: found 'EOF' instead of statement test.d(2): Error: expression expected, not 'EOF' test.d(2): Error: found 'EOF' when expecting ';' following for condition test.d(2): Error: expression expected, not 'EOF' test.d(2): Error: found 'EOF' when expecting ')' test.d(2): Error: found 'EOF' instead of statement test.d(2): Error: found 'EOF' when expecting '}' following compound statement test.d(2): Error: found 'EOF' when expecting ']' fish: “dmd -c test.d” terminated by signal SIGSEGV (Address boundary error) Tested on Linux Mint x64 and a recent install of Arch x64, on DMD v2.070.2 and v2.070.0. The above error uses the fish shell, which generates a slightly different message than bash on a segfault. Found by American Fuzzy Lop.
Comment #1 by k.hara.pg — 2016-03-31T12:04:27Z
Comment #2 by github-bugzilla — 2016-03-31T14:01:02Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/85777711fe7ade95dc3a9fd64e214dee15633250 fix Issue 15855 - "a[{for" causes dmd to segfault https://github.com/D-Programming-Language/dmd/commit/c2276c702eb3237c798584eaccc6ff314474efac Merge pull request #5612 from 9rnsr/fix15855 Issue 15855 - "a[{for" causes dmd to segfault
Comment #3 by github-bugzilla — 2016-10-01T11:45:53Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/85777711fe7ade95dc3a9fd64e214dee15633250 fix Issue 15855 - "a[{for" causes dmd to segfault https://github.com/dlang/dmd/commit/c2276c702eb3237c798584eaccc6ff314474efac Merge pull request #5612 from 9rnsr/fix15855