This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Help Request]: GSL_RANGE_CHECK_OFF ?


Raimondo Giammanco writes:
 >  Just to say that I have tested the "-DGSL_RANGE_CHECK=0
 > -DHAVE_INLINE=1" for having the optimized code, and now 
 > indeed the checks are removed, as valgrind confirms when 
 > accessing after the end of the gsl vectors.
 > 
 >  For good measure, I am using "-DGSL_RANGE_CHECK=1 -DHAVE_INLINE=1"
 > for the debug version of the code as well. 

Incidentally, while we are on this subject I should mention to the
list that I recently started using the C bounds-checking extension to
GCC listed at http://gcc.gnu.org/extensions.html

It works well, I find it very convenient as it can be mixed with
existing libraries.  Previously I used to use "checkergcc", which was
specific to x86 and not maintained --- the new extension is much
better.

For reference, I have posted a short article about it at
http://www.network-theory.co.uk/articles/boundschecking.html

I would recommend this patch to GCC.  I found a bug in GSL using it
(an off-by-one array overflow in gsl_randist_landau).

N.B. it works for C only, not C++.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]