Date: Sun, 26 Mar 2006 10:00:51 +0800 From: David Xu <davidxu@freebsd.org> To: freebsd-threads@freebsd.org Cc: Kostik Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org, Alexander Kabaev <kabaev@gmail.com> Subject: Re: [patch] Re: dlopen() and dlclose() are not MT-safe? YES, esp. for libthr Message-ID: <200603261000.52100.davidxu@freebsd.org> In-Reply-To: <20060325100729.00713045@kan.dnsalias.net> References: <44215FE9.2070602@highway.ne.jp> <20060324084834.GE27116@deviant.kiev.zoral.com.ua> <20060325100729.00713045@kan.dnsalias.net>
next in thread | previous in thread | raw e-mail | index | archive | help
=D4=DA Saturday 25 March 2006 23:07=A3=ACAlexander Kabaev =D0=B4=B5=C0=A3=BA > The thread mask only makes sense when flags are per-thread. I meant > to use it to detect PLT recursions from locking primitives exported to > rtld by the threads library as those are not allowed and threads > implementations are required to take special care to provide only > self-contained locks.=20 >=20 > The 'default' lock implementation will not work with any library > other than libc_r, and even that holds true only for some definition of > "work". The dynamic loader never had a reliable locking and > furthermore, there was no way to make it work better without threading > library cooperation. This is why we came up with a set of callbacks > rtld expects every threading library to provide. libpthread was the > first where these callbacks were implemented. It comes as a surprise > that libthr did not have them, because David Xu was the one who did > most of the work on rtld locking callbacks in libpthread. >=20 > The def_thread_set_flag function use is racy and should be fixed. >=20 > --=20 > Alexander Kabaev I have fixed it in libthr yesterday, I think I must forgot to do it in the past. Regards, David Xu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603261000.52100.davidxu>