delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/07/21:12:30

Date: Sat, 7 Feb 1998 18:12:04 -0800 (PST)
Message-Id: <199802080212.SAA03507@adit.ap.net>
Mime-Version: 1.0
To: Rich <richp AT neta DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Array bounds checking

At 09:13  2/7/1998 -0700, Rich wrote:
>Do any of the gcc compilers do array bounds checking during runtime?  I
>have a very large program, and it's very likely that some routines are
>overstepping their array boundaries.
As far as I know, no. If your arrays are `malloc'-gotten, you may benefit
from a `malloc' debugger, which will check for out-of-bounds writes. One
such is called "Fortify".
Depending on your DPMI server, you may be able to do clever things with
increasing the array sizes and using `mprotect' to protect a page at each
end, but not necessarily, and it may be some work.

Incidentally, please don't post to both the newsgroup and the mailing list.
They are linked to each other, so all the same people see messages posted to
either. When you post to both, we see two copies.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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