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 06/04/2013 12:07 PM, Dimitrios Apostolou wrote:

Quoting
http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html

  On the GNU system, malloc and free are safe to use in signal handlers
because it blocks signals. As a result, the library functions that
allocate space for a result are also safe in signal handlers. The
obstack allocation functions are safe as long as you don't use the same
obstack both inside and outside of a signal handler.

That's very outdated because blocking signals leads to very bad performance, and all code would suffer from that.

--
Florian Weimer / Red Hat Product Security Team


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