Date: Thu, 16 Dec 2010 16:56:44 +0000 (UTC) From: Jaakko Heinonen <jh@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/libexec/rtld-elf rtld.c Message-ID: <201012161656.oBGGuwCp026269@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jh 2010-12-16 16:56:44 UTC FreeBSD src repository Modified files: libexec/rtld-elf rtld.c Log: SVN rev 216489 on 2010-12-16 16:56:44Z by jh If dlclose() is called recursively from a _fini() function, the inner dlclose() call may unload the object of the outer call prematurely because objects are unreferenced before _fini() calls. Fix this by unreferencing objects after calling objlist_call_fini() in dlclose(). Therefore objlist_call_fini() now calls the fini function if the reference count of an object is 1. In addition we must restart the list_fini traversal after every _fini() call because another dlclose() call might have modified the reference counts. Add an XXX comment to objlist_call_fini() about possible race with dlopen(). PR: 133246, 149464 Reviewed by: kan, kib Revision Changes Path 1.161 +38 -16 src/libexec/rtld-elf/rtld.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012161656.oBGGuwCp026269>