[patch] Re: dlopen() and dlclose() are not MT-safe? YES,
esp. for libthr
David Xu
davidxu at freebsd.org
Fri Mar 24 10:46:14 UTC 2006
在 Friday 24 March 2006 16:48,Kostik Belousov 写道:
> I did understand the purpose of the thread mask code in
> libexec/rtld/rtld_lock.c, or, more precisely, the condition where this code
> works (for the context, see the mails with same subject on freebsd-hackers).
>
> Look, that code assumes that blocking async signals would stop thread
> scheduler from doing preemption of the current thread. This works
> for libc_r, but fails in libpthread and libthr cases. libpthread provides
> implementation of the locks for rtld. But libthr does not !
>
> As result, rtld exhibit races when used with libthr. In other words,
> libthr needs code to do proper locking.
>
> Do you agree ? Does somebody already planned to do this work ?
>
> Best regards,
> Kostik Belousov
>
I will check libthr source code to see if I can fix it at the weekend.
David Xu
More information about the freebsd-hackers
mailing list