[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-16 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #8 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Jan 16 13:32:39 2017
New Revision: 244493

URL: https://gcc.gnu.org/viewcvs?rev=244493=gcc=rev
Log:
PR libstdc++/78389 fix backwards size adjustments

Backport from mainline
2017-01-16  Ville Voutilainen  

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: Add
better test for the sizes.

Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/bits/list.tcc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-16 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #7 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Jan 16 13:30:58 2017
New Revision: 244492

URL: https://gcc.gnu.org/viewcvs?rev=244492=gcc=rev
Log:
PR libstdc++/78389 fix backwards size adjustments

Backport from mainline
2017-01-16  Ville Voutilainen  

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: Add
better test for the sizes.

Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/list.tcc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-16 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #6 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Jan 16 11:36:33 2017
New Revision: 244490

URL: https://gcc.gnu.org/viewcvs?rev=244490=gcc=rev
Log:
PR libstdc++/78389 fix backwards size adjustments.

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: Add
better test for the sizes.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/list.tcc
trunk/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-15 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #5 from Ville Voutilainen  ---
Fixed merge() on all active branches.

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-15 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #4 from ville at gcc dot gnu.org ---
Author: ville
Date: Sun Jan 15 16:27:08 2017
New Revision: 244475

URL: https://gcc.gnu.org/viewcvs?rev=244475=gcc=rev
Log:
Backport from mainline
2017-01-13  Ville Voutilainen  

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)):
Adjust list sizes if the comparator throws.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: New.

Added:
   
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/bits/list.tcc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-15 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #3 from ville at gcc dot gnu.org ---
Author: ville
Date: Sun Jan 15 16:11:46 2017
New Revision: 244474

URL: https://gcc.gnu.org/viewcvs?rev=244474=gcc=rev
Log:
Backport from mainline
2017-01-13  Ville Voutilainen  

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)):
Adjust list sizes if the comparator throws.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: New.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/list.tcc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-13 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

Ville Voutilainen  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ville.voutilainen at gmail dot 
com
 Resolution|--- |FIXED

--- Comment #2 from Ville Voutilainen  ---
Fixed on trunk.

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-13 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

--- Comment #1 from ville at gcc dot gnu.org ---
Author: ville
Date: Fri Jan 13 14:46:25 2017
New Revision: 244439

URL: https://gcc.gnu.org/viewcvs?rev=244439=gcc=rev
Log:
PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)):
Adjust list sizes if the comparator throws.
(merge(list&&, _StrictWeakOrdering)): Likewise.
(sort()): Splice elements back from the scratch buffers
if the comparator throws.
(sort(_StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: New.

Added:
trunk/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/list.tcc

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-11
 Ever confirmed|0   |1