🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5044

Re: Stack Overflow! tc++

#5044
From: Steelworker
Date: Wed, 06 Mar 1991 17:04
33 lines
1758 bytes
In article <1991Mar6.135439.22464@murdoch.acc.Virginia.EDU> pts@faraday.clas.Virginia.EDU (Paul T. Shannon) writes:

[description deleted . . .]
:Now I find that as soon as the first call is made  by main.cpp, to a member 
:function in class.cpp, the program aborts with the message 

:  Stack Overflow!

:I've checked for errors, I've tried many different memory models, I've 
:traced execution with td 2.0.  All to no avail.

:If however, I turn the stack checking off (from the compiler option menu),
:the program runs fine....except that I'm really nervous about what sins
:might be hidden behind the curtains.

:Has anyone seen a bug like this?  Any suggestions?

: - Paul Shannon
:   pts@virginia.edu

This just means that you have allocated more than the default amount
of data available on the stack (4k?).  If you declare large arrays on the
stack, it can quickly fill up.  Also, if you pass large structures to
functions, that can use up a lot of your stack.   
The other possible problem ( does not seem to be your case) happens when
a user function is called from an interrupt ( often used in mouse
functions), and the stack is not in the state Turbo-c thinks it should
be in.  
In general, you should leave stack checking on; otherwise, your programs
will get untrackable bugs when you run out of stack.

Good luck,
Robert Blair
Technical Details
Message-ID: <9673@hub.ucsb.edu>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!hub.ucsb.edu!ucsbuxa!6600m00n
References: <1991Mar6.135439.22464@murdoch.acc.Virginia.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!hub.ucsb.edu!ucsbuxa!6600m00n
From: 6600m00n@ucsbuxa.ucsb.edu (Steelworker)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Stack Overflow! tc++
Message-ID: <9673@hub.ucsb.edu>
Date: 6 Mar 91 17:04:53 GMT
References: <1991Mar6.135439.22464@murdoch.acc.Virginia.EDU>
Sender: news@hub.ucsb.edu
Lines: 33