Author: Dann Corbit
Date: 17:00:39 01/18/02
Go up one level in this thread
On January 18, 2002 at 19:51:43, David Rasmussen wrote: >Are there any compilers that can be asked to compile bounds checks on array >accesses into the code, possibly in some sort of debug mode? I remember in my >old Pascal days, that Turbo Pascal did a runtime error if you accessed an array >out of bounds. Of course this was slow, so you could turn it off in release >builds (I think). I don't understand why all good compilers doesn't have a >"failsafe" mode where all sorts of checks are compiled into the code. There are tools for that. Electric Fence, Purify, BoundsChecker, Insure++, Spotlight, SmartHeap. Here is something for GCC: http://www.gnu.org/software/gcc/projects/bp/main.html Here's a malloc debug library: http://www.escape.de/users/quincunx/rmdebug.html Some compilers have a switch for it, but they do a very poor job of it anyway. This link is worth a look: http://www.mathtools.net/C++/Memory_management/ You ought to have some sort of tool like that. I can't imagine going on without one! You can also get LCLint for free (works on C only) and PC-Lint from Gimpel that works on C++ (Gimpel also has a lint for UNIX).
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.