PR 13631 Problems in messages

Jonathan Wakely jwakely@redhat.com
Fri Mar 20 10:02:00 GMT 2015


On 19/03/15 21:49 +0100, François Dumont wrote:
>On 18/03/2015 17:17, Jonathan Wakely wrote:
>>The new get_glibc_msg function doesn't compile with old versions of
>>glibc, _M_name_messages is not defined (the code is also not exception
>>safe, but that was not introduced by the recent changes).
>
>    Does it really have to be exception safe ? I considered that 
>between allocation of the duplicated string and it being freed there 
>were only calls to C functions so no exception expected. Am I wrong in 
>this assumption ?

I mispoke, it's exception-safe, because it won't alter the global
locale unless the allocation succeeded, but it could still throw an
exception that isn't handled.

It doesn't really matter, since that code only gets used for ancient
versions of glibc, but it should at least be able to compile! :-)



More information about the Libstdc++ mailing list