www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/06/14:19:38

From: Yamaha / XYZZ <scriven AT CS DOT ColoState DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 80387 Exception: stack underflow! ????
Date: Wed, 06 Nov 1996 10:39:48 -0700
Organization: XYZZ Software Co.
Lines: 25
Message-ID: <3280CD64.2781@CS.ColoState.edu>
References: <327e436d DOT 122583736 AT news DOT netvision DOT net DOT il>
NNTP-Posting-Host: seurat.vis.colostate.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ronen Friedman wrote:

> Can anyone hint on what the 'stack overflow' mean here?

"Stack Underflow" means that you popped too much.  Stack Overflow means
that you pushed too much.  

Often, stack overflow just means that you just had too many functions
called at once, or recursed too deeply.  One solution is to increase the
stack size; or you could make the function calls shallower.

But you wanted to know about stack underflow.  Have you been using any
assembly code?  If so, you need to eliminate some extra POPs.  If not, I
don't know how you could get this error with plain C code.  It's really
not a very common error, because it's hard to get without using assembly
code.  Take a look at the assembly code that GCC generates.  You might
find the problem there (just look for excessive POPs).

Of course, you might just have a wild pointer somewhere, too...


-- Yamaha / XYZZ
mailto:scriven AT CS DOT ColoState DOT edu          
mailto:scriven AT VIS DOT ColoState DOT edu
http://www.vis.colostate.edu/~scriven/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019