[Bug libstdc++/66742] abort on sorting list with custom allocator that is not stateless

rs2740 at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 16 22:17:00 GMT 2016


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

--- Comment #9 from TC <rs2740 at gmail dot com> ---
The ugly fix in Comment #6 should be performant, if, well, ugly.

It may be worth considering holding the nodes via a different type. There's no
real reason why the temporary holders need to be a `list` or have a copy of the
allocator as long as we make sure that everything in there is spliced back into
*this when we exit sort() (by exception or normal return).

Speaking of exceptions, merge() appears to have exception safety problems. I'll
file a separate bug.


More information about the Gcc-bugs mailing list