www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/28/16:05:09

Xref: news-dnh.mv.net comp.os.msdos.djgpp:2263
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!ix.netcom.com!netcom.com!mictali
From: mictali AT netcom DOT com (Jere McDevitt)
Subject: Re: (none)
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <DFBy8w DOT Jn4 AT jade DOT mv DOT net>
Date: Thu, 28 Sep 1995 16:40:31 GMT
Lines: 19
Sender: mictali AT netcom5 DOT netcom DOT com
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

byers AT cs DOT utk DOT edu wrote:
:   Okay.. I'm pretty stupid.  I'm sorry about that last message I sent.  It
: appears that the C array was too small.  It works now.  I don't know why that
: would cause the problem it did.  I expected a segmentation fault but it was
: just me, not the compiler. :)

: Sorry,
: Stephen Byers

One reason it could have happened is that if the arrays and the index
variable i were all stack variables (local to the procedure) then
overwriting the end of the array would merely overwrite the next variable on
the stack but not cause a segment violation because the next space on the
stack is still available.

Going to far could have caused other problems if the return address of the
routine that called this one was overwritten.

Jere McDevitt

- Raw text -


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