[Clp] Turning off array bounds checking in the COIN library?

Matthew Saltzman mjs at clemson.edu
Thu Nov 3 08:53:56 EDT 2016


Usually, John Forrest is on top of posts to this list. Not sure why he
missed this one.

With GNU compilers, the compiler option for checking bound errors at
runtime isn't functional for C or C++ and the array-bounds warning is of
limited utility. So no, I'm pretty sure there is no bounds checking by
default. 

You can use runtime memory debuggers such as Valgrind to catch most
kinds of array bound errors. g++ now comes with Google's
AddressSanitizer (ASan) feature, but I don't believe we invoke that by
default. You can modify the compiler options in the configure step to
try that out, but I don't know the exact incantation.

HTH.

On Thu, 2016-11-03 at 18:38 +1100, Robin Whittle wrote:
> Since the only response to my question was the sound of crickets, and
> since I have looked into some of the code and found no such bounds
> checking mechanism, I conclude that my recollection was imaginary!
> 
>   Robin
> _____________


On Thu, 2016-10-20 at 23:31 +1100, Robin Whittle wrote:
> Some time ago I recall reading - perhaps on this list - that the code
> which is in the CLP library, or perhaps which the CLP library uses in
> the COIN library, is by default compiled with arrangements which trap
> any access to arrays beyond the bounds of these arrays.
> 
> "Bounds checking" is the term often used for such a facility, but
> searching the source for this doesn't help since the word is
frequently
> used to refer to LP bounds.
> 
> Can someone point me to such a facility?  I assume it could be turned
> off to improve performance.
> 
> Robin

-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu




More information about the Clp mailing list