This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Bugzilla Bug 24025


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]