Boost C++ Libraries: Ticket #2195: [uBlas] compressed_matrix::erase_element() segfaults https://svn.boost.org/trac10/ticket/2195 <p> The following example segfaults, system is GCC 3.4.4 on Cygwin, Boost 1.35.0. </p> <pre class="wiki">compressed_matrix&lt;int&gt; m(2,2); m(0,0) = 1; m.erase_element(1,0); </pre><p> The problem is that inside erase_element std::lower_bound oddly returns it_begin, even though simple </p> <pre class="wiki">while(*itt &lt; elem2) ++itt; </pre><p> returns it_begin+2. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2195 Trac 1.4.3 Mon, 03 Nov 2008 14:20:34 GMT milestone deleted https://svn.boost.org/trac10/ticket/2195#comment:1 https://svn.boost.org/trac10/ticket/2195#comment:1 <ul> <li><strong>milestone</strong> <span class="trac-field-deleted">Boost 1.35.1</span> </li> </ul> <p> Milestone Boost 1.35.1 deleted </p> Ticket Gunter Mon, 22 Jun 2009 19:42:33 GMT status, version changed; milestone set https://svn.boost.org/trac10/ticket/2195#comment:2 https://svn.boost.org/trac10/ticket/2195#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.35.0</span> → <span class="trac-field-new">Boost Development Trunk</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.40.0</span> </li> </ul> <p> bug still exists with gcc version 4.3.2 (Debian 4.3.2-1.1) </p> Ticket Gunter Mon, 22 Jun 2009 19:43:39 GMT attachment set https://svn.boost.org/trac10/ticket/2195 https://svn.boost.org/trac10/ticket/2195 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">comp_mat_erase.cpp</span> </li> </ul> <p> example to provoke segfault </p> Ticket Gunter Mon, 22 Jun 2009 20:53:51 GMT <link>https://svn.boost.org/trac10/ticket/2195#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2195#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/54230" title="comp_mat_erase.cpp - unit test to verify compressed matrix layout, ...">[54230]</a>) comp_mat_erase.cpp - unit test to verify compressed matrix layout, insertion and erasure of elements, see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2195" title="#2195: Bugs: [uBlas] compressed_matrix::erase_element() segfaults (closed: fixed)">#2195</a> </p> <p> CMakeLists.txt - added new test: comp_mat_erase </p> <p> Jamfile.v2 - added new test: comp_mat_erase </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Mon, 22 Jun 2009 20:58:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2195#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2195#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/54231" title="matrix_sparse.hpp - see #2195, fixed ...">[54231]</a>) matrix_sparse.hpp - see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2195" title="#2195: Bugs: [uBlas] compressed_matrix::erase_element() segfaults (closed: fixed)">#2195</a>, fixed compressed_matrix::erase_element(); must use &gt;= instead of &gt; because the last element of index1_data is the "end of list" marker. Segfault was caused by *(itv + 1) which pointed to an element _after_ index1_data.end() </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Mon, 05 Oct 2009 21:41:34 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2195#comment:5 https://svn.boost.org/trac10/ticket/2195#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</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/56605" title="fix #2195: * merged changes into release branch ">[56605]</a>) fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2195" title="#2195: Bugs: [uBlas] compressed_matrix::erase_element() segfaults (closed: fixed)">#2195</a>: </p> <ul><li>merged changes into release branch </li></ul> Ticket Gunter Mon, 05 Oct 2009 21:42:49 GMT milestone changed https://svn.boost.org/trac10/ticket/2195#comment:6 https://svn.boost.org/trac10/ticket/2195#comment:6 <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> merged into 1.41.0 </p> Ticket