We need to run CQP and the CWB tools through Valgrind on Linux, in order to see whether we have big memory leaks, buffer overflows or looming segmentation faults.
add a COMPILE_WITH_DEB UG variable in the CWB makefile, which when defined causes GCC to run with the -0g options (no optimisation, include debug info)
modify the test engine in CWB-Perl to ad a "valgrinding" option, which when true will run all commands within valgrind
Going from COMMAND
to
valgrind --leak-check=yes COMMAND
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the Perl modules: this should be doable by adding a single switch when "make" runs. This should insert a variable $ValgrindCmd into Config.pm (empty string by default, with the flag, "valgrind --leak-check=yes "
This can be triggered when running Makefile.PL:
perl Makefile.PL --with-valgrind
Then, modify CWB/lib/CWB.pm where the application "full pathnames" are set. Lines 177 ff
For each one, add CWB::Config::$ValgrindCmd before $BinDir.
We also want C compilation done by the Perl installer to use the GCC flags. I think this involves WriteMakefile().
OPTIMIZE => ($with_valgrind ? "-Og" : "-O"),
In CWB itself: very simple check on WITH_VALGRIND.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Steps to accomplish this:
Going from
COMMAND
to
valgrind --leak-check=yes COMMAND
In the Perl modules: this should be doable by adding a single switch when "make" runs. This should insert a variable $ValgrindCmd into Config.pm (empty string by default, with the flag, "valgrind --leak-check=yes "
This can be triggered when running Makefile.PL:
Then, modify CWB/lib/CWB.pm where the application "full pathnames" are set. Lines 177 ff
For each one, add CWB::Config::$ValgrindCmd before $BinDir.
We also want C compilation done by the Perl installer to use the GCC flags. I think this involves WriteMakefile().
In CWB itself: very simple check on WITH_VALGRIND.