2011/3/24 Timo Teräs :
> On 03/24/2011 12:27 AM, Mike Frysinger wrote:
>> mmm my understanding was that each thread got its own chunk of TLS
>> area at thread creation time, and after that the ldso only existed
>> when the thread needed to know the address of its TLS.  what port are
>> you talking about exactly ?
>
> But if after startup, someone does dlopen(libfoo.so) and libfoo defines
> global TLS variables, those variables need to be allocated from the
> global TLS tables. I believe that's mostly done in _dl_add_to_slotinfo.

duh, i really should have seen that

> So. As immediate bandage aid, we probably need to add rwlock (or just
> regular mutex) to dlopen (rw)/dlsym (ro)/dlclose (rw). That should at
> least prevent crashes. But yes, more fine grained locking (or even RCU)
> would be preferable.

i think a patch to that effect with a note in the TODO of making it
suck less would be fine
-mike
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to