<div class="markdown_content"><p>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 "</p>
<p>This can be triggered when running Makefile.PL:</p>
<div class="codehilite"><pre><span></span>perl Makefile.PL --with-valgrind
</pre></div>


<p>Then, modify CWB/lib/CWB.pm where the application "full pathnames" are set. Lines 177 ff</p>
<p>For each one, add CWB::Config::$ValgrindCmd before $BinDir. </p>
<p>We also want C compilation done by the Perl installer to use the GCC flags.  I think this involves WriteMakefile().</p>
<div class="codehilite"><pre><span></span> OPTIMIZE =&gt; ($with_valgrind ? "-Og" : "-O"),
</pre></div>


<p>In CWB itself: very simple check on WITH_VALGRIND. </p>
<hr/>
<p><strong> <a class="alink" href="https://sourceforge.net/p/cwb/bugs/40/">[bugs:#40]</a> Memory leak check on cwb utils and cqp</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> TODO-3.5<br/>
<strong>Created:</strong> Fri Sep 03, 2010 10:56 AM UTC by Andrew Hardie<br/>
<strong>Last Updated:</strong> Thu Apr 08, 2021 12:52 AM UTC<br/>
<strong>Owner:</strong> Andrew Hardie</p>
<p>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.</p>
<hr/>
<p>Sent from sourceforge.net because cwb@sslmit.unibo.it is subscribed to <a href="https://sourceforge.net/p/cwb/bugs/">https://sourceforge.net/p/cwb/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/cwb/admin/bugs/options.">https://sourceforge.net/p/cwb/admin/bugs/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>