[Bug libstdc++/63698] [5 Regression] std::set leaks nodes on assignment
François Dumont
frs.dumont@gmail.com
Tue Nov 4 22:06:00 GMT 2014
Hi
Here is more or less the patch proposed on the ticket with the test
case also provided in the ticket.
2014-11-04 François Dumont <fdumont@gcc.gnu.org>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/63698
* include/bits/stl_tree.h (_Reuse_or_alloc_node): Simplify constructor.
Always move to the left node if there is one.
* testsuite/23_containers/set/allocator/move_assign.cc (test04): New.
Tested under Linux x86_64, ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree.patch
Type: text/x-patch
Size: 4082 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141104/6a5a1091/attachment.bin>
More information about the Gcc-patches
mailing list