[Patch] libstdc++/25421

Paolo Carlini pcarlini@suse.de
Thu Dec 15 01:19:00 GMT 2005


Hi,

the below one-liner is a minimal fix for the reported Segmentation
fault: what's happening is that when _S_create_c_locale throws during
the construction of the *_byname facets, __cloc is zero and the base
class destructor passes that zero to _S_destroy_c_locale (__freelocale
doesn't tolerate a null argument).

The patch is meant for 4_0 / 4_1 / mainline, but later, for mainline at
least, I'd like to work a bit more on the *_byname facets, because
probably we can simplify some constructors and thus also avoid very
easily a small memory leak under exceptions in messages_byname.

Tested x86-linux.

Paolo.

/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_25421
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051215/d25cc082/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_25421
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051215/d25cc082/attachment-0001.ksh>


More information about the Libstdc++ mailing list