This is the mail archive of the libc-alpha@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: Async-signal-safe access to __thread variables from dlopen()ed libraries?


On Sep 18, 2013, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:

> - introduces async-signal-safe mmap-based allocator into elf/dl-misc.c, and
> - updates the rest of the loader to use this allocator when getting space
>   for non-static TLS.

Why not make malloc AS-safe instead?  I've reviewed it, and having
multiple arenas seems to make it not too hard to use an alternate arena
if the primary arena for a thread happens to be already locked.  It's
only if we have to create a new arena that we might get in trouble, but
then, worst case, malloc itself can always fallback to mmapped
allocation.

Wouldn't that be a more advantageous path to take?

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


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