]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Work around an assert failure in the dynamic linker's default thread
authorjdp <jdp@FreeBSD.org>
Tue, 28 Dec 1999 04:38:17 +0000 (04:38 +0000)
committerjdp <jdp@FreeBSD.org>
Tue, 28 Dec 1999 04:38:17 +0000 (04:38 +0000)
commit363b7bd53715dfc3c4b8bc6809fed0a241c34a9a
tree69b2660c2be6f033a411c7b6f07eb8728f078b9d
parentc96f8e891fe73a35ab2082f6403dd88a66ac0222
Work around an assert failure in the dynamic linker's default thread
locking functions.  If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker.  This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.

This work-around makes the default locking functions handle recursive
locking.  It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions.  I will implement the correct fix in a future commit.

Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.
include/dlfcn.h
lib/libc/gen/dllockinit.3
libexec/rtld-elf/alpha/lockdflt.c
libexec/rtld-elf/amd64/lockdflt.c
libexec/rtld-elf/i386/lockdflt.c
libexec/rtld-elf/lockdflt.c