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

[Bug dynamic-link/22745] _nptl_setxid can loop forever if a dlmopen namespace tries to initialise pthreads after the main namespace does


https://sourceware.org/bugzilla/show_bug.cgi?id=22745

--- Comment #8 from Vivek Das Mohapatra <vivek at collabora dot com> ---
So, staring at this code for a while - will the following approach to 
cloning an object into a secondary link map work:

 - allocate a new entry in the same way as _dl_new_object
 - memcpy the contents of the old entry to the new
 - set the next and previous pointers to NULL in the new struct
 - hook the next and prev pointers up to the new link map list

The existing clone operation for ld.so seems to be a special case
which pokes the real pointer into l_real in a freshly allocated
struct, but doesn't care much about the details as the linker can't
depend on anything and nothing relocates symbols from it (I think?)

[I realise I haven't addressed the dont-apply-uniqueness-to-audit
 requirement yet - will look at that once I know how to make it 
 work at all]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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