This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/18524] Missing calloc error checking in __cxa_thread_atexit_impl
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 06 Oct 2015 19:21:03 +0000
- Subject: [Bug nptl/18524] Missing calloc error checking in __cxa_thread_atexit_impl
- Auto-submitted: auto-generated
- References: <bug-18524-131 at http dot sourceware dot org/bugzilla/>
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.