Thread overview | |||||
---|---|---|---|---|---|
|
March 18, 2005 Stack Overflow | ||||
---|---|---|---|---|
| ||||
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 |
March 19, 2005 Re: Stack Overflow | ||||
---|---|---|---|---|
| ||||
Posted in reply to SK | 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
|
March 22, 2005 Re: Stack Overflow | ||||
---|---|---|---|---|
| ||||
Posted in reply to SK | "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. |
Copyright © 1999-2021 by the D Language Foundation