www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/25/20:30:30

From: Rob Bacher <bacher2 AT tcnj DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Help! Program crashing for no reason!
Date: Wed, 25 Feb 1998 20:24:39 -0500
Organization: The College of New Jersey
Lines: 31
Message-ID: <34F4C457.5F85E9FB@tcnj.edu>
Reply-To: bacher2 AT tcnj DOT edu
NNTP-Posting-Host: trv0523r
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm having a tough time with DJGPP.

I keep getting random SIGSEGV errors when I run my program.  I read some
stuff about this, and it seems that my problems is are coming from not
enough stack space.  I saw some stuff about this in the DJGPP faq, and I
tried everything, and it has not helped.  Actually, everything I tried
worked for a while, but then the SIGSEGV errors come back.  For example,
compiling with -m486 took it away for awhile, and so did -O2.  After
adding more code to the program, the errors returned.

And, if I don't get SIGSEGV errors, I get vars being randomly changed. I
trace through the program line by line and watch and variables change
for no reason.

I have about 1.5 megs in arrays and stuff in my program.  The program is
7000 lines and compiles into a 550k .exe.  I set _stklen to 8 megs.
After I compile the program, stubedit reports that stacklength is still
256k.  Then I change it to 8 megs, and but I still get SIGSEGV errors.

I was using RHIDE, and somewhere it said that that could be messing up
the stack so I've been compiling from the DOS command line.  That
stopped the errors, for awhile, but again the errors returned.

Something else that I noticed that would help stop the vars from
changing is to put extra lines of dummy code before it, like "a=a;" or
something.

Anybody have any ideas?

Rob

- Raw text -


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