GCC Bugzilla Bug 24025
Paolo Carlini
pcarlini@suse.de
Fri Nov 4 10:26:00 GMT 2005
Hi,
> --- libstdc++-v3/libsupc++/eh_globals.cc (revision 106370)
> +++ libstdc++-v3/libsupc++/eh_globals.cc (working copy)
> @@ -115,7 +115,10 @@
> if ((g = (__cxa_eh_globals *)
> std::malloc (sizeof (__cxa_eh_globals))) == 0
> || __gthread_setspecific (globals_key, (void *) g) != 0)
> - std::terminate ();
> + {
> + std::free(g);
> + return &globals_static;
> + }
A general comment: irrespective of the meaning of global_static and the
substance of the issue, it seems to me that if malloc returns zero and
the conditional is early true, we have nothing to free...
Paolo.
More information about the Libstdc++
mailing list