www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/09/09:00:37

Xref: news2.mv.net comp.os.msdos.djgpp:4741
From: malcolm AT manawatu DOT gen DOT nz (Malcolm Taylor)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Not optimizing=Crash???
Date: Fri, 07 Jun 1996 21:34:37 GMT
Organization: Grafik Software
Lines: 23
Message-ID: <4pab39$3s1@news.manawatu.gen.nz>
References: <1996Jun6 DOT 104656 AT zipi DOT fi DOT upm DOT es>
Reply-To: malcolm AT manawatu DOT gen DOT nz
NNTP-Posting-Host: malcolm.manawatu.gen.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

a920101 AT zipi DOT fi DOT upm DOT es wrote:

>Hi everybody!
>   I am programming a game with DJGPP 2.0, and I'm finding it is a realy
>*great* tool. I have currently written 2500+ lines in C++/Asm, and had no
>problem (except for my own bugs ;). But now I am facing a strange behaviour
>with my program: If I compile it *without* optimizations (-m486 -O3), it
>crashes with a page fault after exiting the game (I mean: you quit playing,
>and then it dumps out a GPF, no problem *while* playing). I find no problem
>when compiling with -m486 -O3, anyway.
>I've debugged the generated code, and I've found that the problem is GCC
>not passing the correct arguments to some functions. I call the function
>with the correct parameter (made sure of this), but it gets a wild one!
>I stopped using the nearptr feature, as this is dangerous, but the problem
>didn't went away...any clue???

Post the operating system that you are under, and the stack-trace that
your program prints when it gives a gpf. At a guess it may be a stack
overflow, in which case stubedit your program to have 500K or 1M of
stack instead of the standard 256K and see if that helps.

Malcolm

- Raw text -


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