www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/11/08:38:43

Xref: news2.mv.net comp.os.msdos.djgpp:958
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NOT grx 2.0 problem, stack problem
Date: Sat, 10 Feb 1996 10:53:25 CST
Organization: Rice University, Houston, Texas
Lines: 16
Message-ID: <311ccd85.sandmann@clio.rice.edu>
References: <DMIvBJ DOT 57E AT granite DOT mv DOT net>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: clio.rice.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> I had a program from djgpp v1 I tried to recompile under v2 and it bombed.
> int main(void) {
> 	int t_array[512][512]; 

This is the problem line - under DPMI in V1.x and always under V2.x there is
a fixed stack size, which defaults to 256K.  In this case your automatic
data is 256K, overruns the stack, and then the return EIP gets trashed by
some other data.

Either stubedit your image to increase the stack, or make the data static.

> Stack Fault at eip=00001545
> ebp=0005e408 esp=fff5e408 cs=00e7 ds=00ef es=00ef fs=00cf gs=00ff ss=00ef

Here in the register information, it clearly says stack fault.  
The ESP is way too large.

- Raw text -


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