http://d.puremagic.com/issues/show_bug.cgi?id=5176
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #13 from [email protected] 2013-01-09 17:21:29 PST --- Very large structs can also corrupt memory not just via null references, but via stack overflow. (Just pass a large struct by value down a few levels of recursion, and the stack will overflow.) And it's easier than one might think: struct S { dchar[256] buffer; } Looks small, right? Well, sizeof(dchar)=4, which means sizeof(S)=1024. On Linux, the default stacksize is about 4KB. That means passing S by value down just 3-4 levels of recursion is enough to overflow the stack. And currently, I don't think DMD does any handling for stack overflow; it just crashes (and may corrupt memory as well, I didn't look into it). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
