Boost C++ Libraries: Ticket #2647: valgrind error with Boost.Test https://svn.boost.org/trac10/ticket/2647 <p> Hi Gennadiy, </p> <p> either the fix for this has never been committed or the fix got reverted at some point. </p> <p> See this thread for the discussion and solution: </p> <p> <a class="ext-link" href="http://thread.gmane.org/gmane.comp.lib.boost.devel/180182/focus=180190"><span class="icon">​</span>http://thread.gmane.org/gmane.comp.lib.boost.devel/180182/focus=180190</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2647 Trac 1.4.3 Kevin Sopp Sun, 17 May 2009 11:39:34 GMT attachment set https://svn.boost.org/trac10/ticket/2647 https://svn.boost.org/trac10/ticket/2647 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_valgrind.patch</span> </li> </ul> Ticket Kevin Sopp Sun, 17 May 2009 11:41:07 GMT type, milestone changed https://svn.boost.org/trac10/ticket/2647#comment:1 https://svn.boost.org/trac10/ticket/2647#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.38.0</span> → <span class="trac-field-new">Boost 1.40.0</span> </li> </ul> <p> I wrote a small patch to fix this. </p> Ticket smr@… Mon, 28 Sep 2009 05:43:39 GMT attachment set https://svn.boost.org/trac10/ticket/2647 https://svn.boost.org/trac10/ticket/2647 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-test-invalid-read.patch</span> </li> </ul> <p> Debian's fix </p> Ticket smr@… Mon, 28 Sep 2009 05:44:15 GMT milestone changed https://svn.boost.org/trac10/ticket/2647#comment:2 https://svn.boost.org/trac10/ticket/2647#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">Boost 1.41.0</span> </li> </ul> <p> This has also been reported to distributors such as Debian (<a class="ext-link" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538946"><span class="icon">​</span>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538946</a>). Debian has elected to follow the suggestion of Peter Klotz; see the final message of <a class="ext-link" href="http://www.nabble.com/-Boost.Test--valgrind-complains-about-invalid-reads-td20500154.html"><span class="icon">​</span>http://www.nabble.com/-Boost.Test--valgrind-complains-about-invalid-reads-td20500154.html</a> </p> <p> In summary: </p> <ol><li>The destructor of class test_unit is made virtual and public. </li><li>The method framework::clear() is much simpler: no downcast needed. </li></ol><p> Patch attached. </p> Ticket Gennadiy Rozental Tue, 29 Sep 2009 01:33:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2647#comment:3 https://svn.boost.org/trac10/ticket/2647#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56467" title="apparently compiler might want to examine tu.second twice: before and ...">[56467]</a>) apparently compiler might want to examine tu.second twice: before and after calling destructor Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2889" title="#2889: Bugs: Unit Test framework does things that OS X's malloc dislikes (closed: fixed)">#2889</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3432" title="#3432: Bugs: Boost:Test pointer error with g++ 64-bit on Mac OS X 10.6 Snow Leopard (closed: fixed)">#3432</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2647" title="#2647: Patches: valgrind error with Boost.Test (closed: fixed)">#2647</a> </p> Ticket