Bug 6678 – optlink crash with large array of structs

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-09-15T12:59:56Z
Last change time
2017-10-25T03:17:43Z
Keywords
diagnostic, Optlink
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-09-15T12:59:56Z
This D2 program: double[7_000_000] array = void; void main() {} DMD 2.055 gives an expected error message: test.d(1): Error: index 7000000 overflow for static array But this similar program: struct Foo { double x /*= 0*/; } Foo[7_000_000] array = void; void main() {} Causes a crash of optlink at EIP=004114FC.
Comment #1 by bearophile_hugs — 2012-08-11T05:47:53Z
*** Issue 8536 has been marked as a duplicate of this issue. ***
Comment #2 by andrej.mitrovich — 2013-02-16T12:06:53Z
Apart from the linker crash this could also be a DMD accepts-invalid bug.
Comment #3 by bugzilla — 2017-10-25T03:17:43Z
(In reply to bearophile_hugs from comment #0) > But this similar program: > [...] > Causes a crash of optlink at EIP=004114FC. Now causes: test.d(4): Error: variable test.array size of 0x3567e00 exceeds max allowed size 0x1000000