On Thu, Apr 30, 2020 at 10:33 AM Matthew Fernandez <matthew.fernan...@gmail.com> wrote: > > > On Apr 30, 2020, at 00:31, Andreas Tille <andr...@fam-tille.de> wrote: > > > > On Wed, Apr 29, 2020 at 05:51:26PM -0700, Matthew Fernandez wrote: > > > >> The other option I suggested was Valgrind, but if you can’t run apt-file > >> you probably can’t install Valgrind either. > > > > Well, I guess apt-get is permitted for sudo but not apt-file. So I can > > probably install valgrind inside the chroot environment. I've never > > worked with valgrind. What am I supposed to do? > > Valgrind, in its default mode, checks for a variety of memory issues > (use-after-free, write out-of bounds, …). You don’t need any special > configure/build options, but you probably want to enable debug symbols > (`export CFLAGS=-g; export CXXFLAGS=-g`). Then you can prefix the test you’re > running with Valgrind: `valgrind ./src/clustalo -i > debian/tests/biopython_testdata/f002 …`.
One small issue... Valgrind recommends -O0 or -O1: <QUOTE> Compile your program with -g to include debugging information so that Memcheck's error messages include exact line numbers. Using -O0 is also a good idea, if you can tolerate the slowdown. With -O1 line numbers in error messages can be inaccurate, although generally speaking running Memcheck on code compiled at -O1 works fairly well, and the speed improvement compared to running -O0 is quite significant. Use of -O2 and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist. </QUOTE> Also see the Valgrind Quick Start Guide, Section 2. Preparing Your Programs, at http://valgrind.org/docs/manual/QuickStart.html. Jeff