This is the mail archive of the libc-help@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]

Re: malloc/free is signal-safe?


On 4 June 2013 14:35, Dimitrios Apostolou <jimis@gmx.net> wrote:
> according to the libc manual, malloc is signal-safe in glibc. However I got

If it really says that then it is a bug in the manual.  malloc is not
async-signal safe  Please quote the section of the manual that
mentions it and file a bug report.

> a deadlock when I sigTERM'd a process during malloc(), and it tried to log
> with vasprintf() (which itself calls malloc).
>
> Am I missing something regarding libc's malloc() reentrancy? Here is the
> backtrace I got:

Maybe you confused it with thread-safe?  malloc is thread-safe, but
not async-signal-safe.

Siddhesh
--
http://siddhesh.in


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