public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/35969]  New: GLIBCXX_DEBUG: list::merge triggers bad assert
@ 2008-04-18  3:12 greened at obbligato dot org
  2008-04-18  3:13 ` [Bug libstdc++/35969] " greened at obbligato dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: greened at obbligato dot org @ 2008-04-18  3:12 UTC (permalink / raw)
  To: gcc-bugs

The attached preprocessed source when compiled with -D_GLIBCXX_DEBUG encounters
a runtime assert at the final call to splice.  According to
http://www.sgi.com/tech/stl/List.html, all iterators remain valid after a merge
operation.  I believe that libstdc++ is not updating the _M_sequence members of
the safe iterators merged into list1.

I've also attached unpreprocessed source with comments indicating the problem.

To reproduce the problem:

% g++ -D_GLIBCXX_DEBUG list.ii
% ./a.out
/usr/include/c++/4.2/debug/list:350:error: attempt to splice an iterator
    from a different container.

Objects involved in the operation:
iterator "__i" @ 0x0xbfd5ea30 {
type =
N11__gnu_debug14_Safe_iteratorINSt6__norm14_List_iteratorIiEENSt7__debug4listIiSaIiEEEEE
(mutable iterator);
  state = dereferenceable;
  references sequence with type `NSt7__debug4listIiSaIiEEE' @ 0x0xbfd5ea30
}
sequence "__x" @ 0x0xbfd5e9c4 {
  type = NSt7__debug4listIiSaIiEEE;
}
Aborted


-- 
           Summary: GLIBCXX_DEBUG: list::merge triggers bad assert
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: greened at obbligato dot org
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35969


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-24 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-18  3:12 [Bug libstdc++/35969] New: GLIBCXX_DEBUG: list::merge triggers bad assert greened at obbligato dot org
2008-04-18  3:13 ` [Bug libstdc++/35969] " greened at obbligato dot org
2008-04-18  3:14 ` greened at obbligato dot org
2008-04-18  3:24 ` pinskia at gcc dot gnu dot org
2008-04-18  3:27 ` greened at obbligato dot org
2008-04-18  4:17 ` greened at obbligato dot org
2008-04-21  0:46 ` pcarlini at suse dot de
2008-04-24 17:04 ` paolo at gcc dot gnu dot org
2008-04-24 17:06 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).