need help with stack overflow 
Author Message
 need help with stack overflow

Can someone tell me what to do when a stack overflow error is encountered
during the running of a program?


Wed, 23 Oct 1996 09:58:33 GMT  
 need help with stack overflow

Quote:

>Can someone tell me what to do when a stack overflow error is encountered
>during the running of a program?

a) reduce the stack usage of your program, and/or

b) increase the size of the stack.

If you want more specific information you will have to give it i.e. the
platform/compiler you are using. Consider posting platform specific questions
to the appropriate newsgroup e.g. comp.os.msdos.programmer for DOS or
comp.unix.programmer for Unix.

--
-----------------------------------------


-----------------------------------------



Wed, 23 Oct 1996 23:06:58 GMT  
 need help with stack overflow

Quote:

>Can someone tell me what to do when a stack overflow error is encountered
>during the running of a program?

You either have endless recursion or you are allocating enormous
variables as local data.  Make sure that you aren't passing huge
structures by value to your procedures.  PC's typicall allocate ony
about 4k to the stack by default, making stack overflows for otherwise
bug-free code a real possibility.  Workstations give a little more
room (8MB on my sparc).

Check your compiler to see if there is a "check for stack overflow"
option.  Borland, and I think most other PC compilers, has such an
option.

You could also run the program with the de{*filter*} and interrupt it,
then get a stack trace, it should be very apparent where the problem is.

Dave



Sat, 26 Oct 1996 04:01:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. C++ Builder Stack Overflow Error - Please help - Need to know how to overcome this Debugger Exception

2. Stack Structure and Stack Overflow for CE

3. stack overflow help?

4. stack overflow help

5. Stack overflow help sought

6. Help! Stack Overflow in Recursive

7. HTML help gives a stack overflow?

8. Help! Stack Overflow in Recursive

9. Stack Overflow ( HELP PLEASE )

10. 3 lines c code has stack overflow, help !

11. VC++ 1.52 Stack Overflow problem pls Help !!!

12. Stack overflow exception

 

 
Powered by phpBB® Forum Software