[Bug nptl/18524] Missing calloc error checking in __cxa_thread_atexit_impl

carlos at redhat dot com sourceware-bugzilla@sourceware.org
Tue Oct 6 19:21:00 GMT 2015


https://sourceware.org/bugzilla/show_bug.cgi?id=18524

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #2)
> (In reply to Ondrej Bilka from comment #1)
> > Do you have patch for that. Only course of action is return which causes
> > memory leak as you don't call destructor later.
> 
> I think the interface cannot be salvaged.  The required space for
> bookkeeping needs to be allocated in .tbss, or separately, at the time .tbss
> is allocated.  I don't think anything in the standard permits leaks or
> exceptions in this context.

So argue QoI, and just abort if calloc returns null? It's a crappy solution,
but it prevents the program from running into undefined territory by not
running destructors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list