Boost C++ Libraries: Ticket #9493: labeled_graph may refer to and operate on released memory after removing a vertex by label https://svn.boost.org/trac10/ticket/9493 <p> Although <code>labeled_graph</code> is not officially part of BGL API some people try to use it. </p> <p> Unfortunately, the current implementation has a serious bug that might lead to a crash. The problem appears when removing a vertex from labeled_graph by its label. My investigation shown that despite of vertex being actually removed, the label is not and it still refers to the removed vertex. </p> <p> The problem is "easier" to reproduce when adjacency_list's <a class="missing wiki">VertexList</a> is set to a container like boost::listS. </p> <p> The attached test case shows the problem. I also attached the output from a valgrind run on the test case code and a patch that fixes the issue for the "configuration" that I use (a more generic fix will probably be needed). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9493 Trac 1.4.3 Adam Romanek <romanek.adam@…> Fri, 13 Dec 2013 12:39:50 GMT attachment set https://svn.boost.org/trac10/ticket/9493 https://svn.boost.org/trac10/ticket/9493 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> Ticket Adam Romanek <romanek.adam@…> Fri, 13 Dec 2013 12:40:00 GMT attachment set https://svn.boost.org/trac10/ticket/9493 https://svn.boost.org/trac10/ticket/9493 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">valgrind.txt</span> </li> </ul> Ticket Adam Romanek <romanek.adam@…> Fri, 13 Dec 2013 12:40:10 GMT attachment set https://svn.boost.org/trac10/ticket/9493 https://svn.boost.org/trac10/ticket/9493 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_labeled_graph_fix.patch</span> </li> </ul> Ticket fawques@… Wed, 19 Mar 2014 18:30:50 GMT <link>https://svn.boost.org/trac10/ticket/9493#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9493#comment:1</guid> <description> <p> Having this issue, the patch worked like a charm. Thanks </p> <p> Replying to <a class="new ticket" href="https://svn.boost.org/trac10/ticket/9493" title="#9493: Bugs: labeled_graph may refer to and operate on released memory after ... (new)">Adam Romanek &lt;romanek.adam@…&gt;</a>: </p> <blockquote class="citation"> <p> Although <code>labeled_graph</code> is not officially part of BGL API some people try to use it. </p> <p> Unfortunately, the current implementation has a serious bug that might lead to a crash. The problem appears when removing a vertex from labeled_graph by its label. My investigation shown that despite of vertex being actually removed, the label is not and it still refers to the removed vertex. </p> <p> The problem is "easier" to reproduce when adjacency_list's <a class="missing wiki">VertexList</a> is set to a container like boost::listS. </p> <p> The attached test case shows the problem. I also attached the output from a valgrind run on the test case code and a patch that fixes the issue for the "configuration" that I use (a more generic fix will probably be needed). </p> </blockquote> </description> <category>Ticket</category> </item> <item> <author>boost@…</author> <pubDate>Wed, 23 Sep 2015 13:08:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9493#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9493#comment:2</guid> <description> <p> This bug is still present in 1.59.0. I would greatly appreciate if the patch finds its way into the next release. </p> </description> <category>Ticket</category> </item> </channel> </rss>