Re: [Fwd: Re: bounds checking a GCC program]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Dec 6, 2006, at 11:05 AM, Stuart Cracraft wrote:

The issue that I had to solve by arduously single-stepping
through a complex program (took a week) turned out to
be a pointer stepping outside of pre-determined places
within a single-dimensional array; that is, the pointer
stayed within the overall array but stepped outside of
determined areas within the array and this resulted
in the clobbering of areas elsewhere.

Having bounds checking that tells me when it stepped
out of the overall array would not have helped.

What is needed is something that says has it stepped
out of a pre-defined area within a single array.

My application is written in C and maintains its own
stack which is what was clobbered.

boost.org has a C++ implementation of a "subrange".  I've never used it
and do not know much about it.  But it sounds like (as in Pascal), you
want you array indexes to be a subrange that is checked.  I think the
boost library can help you there.

Perry Smith ( pedz@xxxxxxxxxxxxxxxx )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux