[Issue 1385] Stack Overflow when compiling large file

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 21 04:28:04 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=1385





------- Comment #2 from clugdbug at yahoo.com.au  2009-04-21 06:28 -------
Created an attachment (id=332)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=332&action=view)
Reduced test case

Reduced test case.  Clearly shows it's caused by the large array literal. On my
system, the smallest array literal which caused a stack overflow was 10776
elements. Needs to be inside a function.

void main() {
ubyte[] data = [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
...
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0];
}
---
Stack overflow.


-- 



More information about the Digitalmars-d-bugs mailing list