https://issues.dlang.org/show_bug.cgi?id=15855
Issue ID: 15855
Summary: "a[{for" causes dmd to segfault
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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.
--