A possible libc/dlmopen/pthreads bug

Carlos O'Donell carlos@redhat.com
Wed Jan 24 20:08:00 GMT 2018


On 01/24/2018 09:46 AM, Vivek Das Mohapatra wrote:
>> In fact I think Vivek examples of running process with two different libcs
>> are working mainly because the different glibc define and access the shared
>> resources in same manner.  I bet it will break the moment we change some
>> state internal layout or semantic (for instance the __stack_user struct size).
> 
> A slight correction - we are deliberately using the _same_ libc to
> avoid exactly that problem - it's that dlmopen as currently implemented
> creates a new mapping of the same libc for the dlmopen namespace.
> 
> I also don't need (or expect) complete isolation of the libc cluster:
> If I could, I would share the same mapping of libc & co with the main
> link map.

This needs fixing, and is one of the reasons that dlmopen is generally
not being made available for this use case until we resolve the underlying
sharing problem.

I'm happy to see patches to make ld.so/glibc shared in all the namespaces.

-- 
Cheers,
Carlos.



More information about the Libc-help mailing list