[Bug libstdc++/14245] problem with user-defined allocators in std::basic_string
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 15:53:00 GMT 2004
------- Additional Comments From pcarlini at suse dot de 2004-02-25 15:53 -------
> What should be improved (notice, *improved* as a QoI issue, the current
> behavior is standard conforming) is what we do for the first argument:
> _M_grab (basing on _Alloc(), and __str.get_allocator()) either calls
> _M_refcopy or _M_clone(__alloc1), that is _M_clone(_Alloc()), that is does
> *not* use the allocator of the new string!
Actually *this* behavior seems wrong, not just a QoI issue. Bad things can
happen at deallocation time, when the real allocator of the string will be
used...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14245
More information about the Gcc-bugs
mailing list