[patch] libstdc++/64368 Fix invalid frees in numpunct_shim with clocale=generic

Jonathan Wakely jwakely@redhat.com
Mon Jan 26 23:42:00 GMT 2015


This should fix most of the FAILs seen on targets that use
--enable-clocale=generic

When I added numpunct_shim I think I got confused/scared by the
clocale=gnu version of numpunct::_M_initialize_numpunct() and decided
not to touch the _M_grouping member of the cache. Looking at it again
now, _M_grouping will only ever point to "" when called by the base
class of a numpunct_shim object, and my comment about numpunct using
_M_grouping for its own purposes seems to be wrong, so numpunct_shim
can just use that member of the cache in the same way it uses the
others.

Tested x86_64-linux, with the gnu and generic clocale models, and on
i686-linux with clocale=gnu only.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 5995 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150126/09e0b85e/attachment.bin>


More information about the Libstdc++ mailing list