[Patch] Fix libstdc++/14245

Paolo Carlini pcarlini@suse.de
Wed Feb 25 18:09:00 GMT 2004


Hi,

after a little bit of struggle ;), I came to the conclusion that
submitter is right. In a nut shell, besides technical points about
sophisticated allocators, the issue is that we should always pass to
_Rep::_M_grab as its first argument the allocator actually used by
the string, otherwise, _S_create (called by _M_clone) may end up
allocating memory via an allocator different from that of the string:
no good.

Tested x86-linux. If nobody objects, will commit early tomorrow to
mainline.

Paolo.

///////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_14245
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040225/6101c5de/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_14245
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040225/6101c5de/attachment-0001.ksh>


More information about the Libstdc++ mailing list