[Bug libstdc++/63698] [5 Regression] std::set leaks nodes on assignment

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 31 11:46:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63698

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 33853
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33853&action=edit
try to fix leak

The rightmost node is not necessarily a leaf, so set _M_nodes to
_M_rightmost()->_M_left if that exists.

Also simplify the constructor as it only needs one argument.



More information about the Gcc-bugs mailing list