www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Stack Overflow

reply SK <SK_member pathlink.com> writes:
I am compiling a large D program. It used to compile normally and execute all
the unittests properly.

But now, its compiling normally, but unittests crashing with "Stack Overflow"
error. I am sure there are no recursions. Could anyone please tell me what could
be the reason ? and how can I increase stack size ? 

Thank you
SK
Mar 18 2005
next sibling parent "Regan Heath" <regan netwin.co.nz> writes:
On Fri, 18 Mar 2005 23:07:48 +0000 (UTC), SK <SK_member pathlink.com>  
wrote:
 I am compiling a large D program. It used to compile normally and  
 execute all
 the unittests properly.

 But now, its compiling normally, but unittests crashing with "Stack  
 Overflow"
 error. I am sure there are no recursions. Could anyone please tell me  
 what could
 be the reason ? and how can I increase stack size ?
Last time I got one of these in D was in/out contracts calling each other i.e. byte[] decode(byte[] data) out (result) { .. compare decode(result) with data .. } body { ..etc.. } byte[] decode(byte[] data) out (result) { .. compare encode(result) with data .. } body { ..etc.. } in other words the 'out' block of 'encode' calls decode, the 'out' block of decide calls encode, the 'out' block of encode .. do you have any of these? Regan
Mar 18 2005
prev sibling parent "Walter" <newshound digitalmars.com> writes:
"SK" <SK_member pathlink.com> wrote in message
news:d1fn04$2cq8$1 digitaldaemon.com...
 I am compiling a large D program. It used to compile normally and execute
all
 the unittests properly.

 But now, its compiling normally, but unittests crashing with "Stack
Overflow"
 error. I am sure there are no recursions. Could anyone please tell me what
could
 be the reason ? and how can I increase stack size ?
There is almost surely a recursion of some sort happening. If you compile with -g and run it under the debugger, when the stack overflow happens take a look at the call stack. It should tell you what is recursing.
Mar 22 2005