[Bug libstdc++/87872] debug list::splice should not call _M_transfer_from_if on self-splices

2018-11-06 Thread fdumont at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87872

François Dumont  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #5 from François Dumont  ---
Patch committed, thanks again.

[Bug libstdc++/87872] debug list::splice should not call _M_transfer_from_if on self-splices

2018-11-06 Thread fdumont at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87872

--- Comment #4 from François Dumont  ---
Author: fdumont
Date: Tue Nov  6 20:20:06 2018
New Revision: 265851

URL: https://gcc.gnu.org/viewcvs?rev=265851=gcc=rev
Log:
2018-11-06  John Bytheway  

PR libstdc++/87872
* include/debug/safe_sequence.tcc
(_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/debug/safe_sequence.tcc

[Bug libstdc++/87872] debug list::splice should not call _M_transfer_from_if on self-splices

2018-11-04 Thread jbytheway at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87872

--- Comment #3 from John Bytheway  ---
Created attachment 44955
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44955=edit
Proposed patch

Sure, here's a proposed patch.  Tested in the sense that I have compiled and
run a program against the changed code, but I have not run the libstdc++ test
suite or similar.

Should affect list::splice and forward_list::splice_after with _GLIBCXX_DEBUG
set.

[Bug libstdc++/87872] debug list::splice should not call _M_transfer_from_if on self-splices

2018-11-03 Thread fdumont at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87872

François Dumont  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-03
   Assignee|unassigned at gcc dot gnu.org  |fdumont at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from François Dumont  ---
All this reflection looks perfectly fine to me, thanks reporting it.

Don't you want to submit a patch then, you're so close.

Otherwise I'll take care in the coming week.

Thanks

[Bug libstdc++/87872] debug list::splice should not call _M_transfer_from_if on self-splices

2018-11-03 Thread jbytheway at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87872

--- Comment #1 from John Bytheway  ---
On further reflection, it would make more sense to put this check inside
_M_transfer_from_if, rather than in every splice function.