This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

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


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.


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