From owner-cvs-all Mon Dec 27 12:58:26 1999 Delivered-To: cvs-all@freebsd.org Received: from shadowmere.student.utwente.nl (wit401305.student.utwente.nl [130.89.236.145]) by hub.freebsd.org (Postfix) with ESMTP id DCA4914D62; Mon, 27 Dec 1999 12:58:22 -0800 (PST) (envelope-from daeron@Wit401305.student.utwente.nl) Received: by shadowmere.student.utwente.nl (Postfix, from userid 1000) id 75BD61FD4; Mon, 27 Dec 1999 21:58:21 +0100 (CET) Date: Mon, 27 Dec 1999 21:58:21 +0100 From: Pascal Hofstee To: John Polstra Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include dlfcn.h src/lib/libc/gen dllockinit.3 Makefile.inc dlfcn.c src/libexec/rtld-elf lockdflt.c Makefile debug.h rtld.c rtld.h src/libexec/rtld-elf/alpha reloc.c src/libexec/rtld-elf/i386 reloc.c Message-ID: <19991227215821.A4497@shadowmere.student.utwente.nl> References: <199912270444.UAA01884@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199912270444.UAA01884@freefall.freebsd.org>; from jdp@FreeBSD.org on Sun, Dec 26, 1999 at 08:44:04PM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Sun, Dec 26, 1999 at 08:44:04PM -0800, John Polstra wrote: > jdp 1999/12/26 20:44:04 PST > > Modified files: > include dlfcn.h > lib/libc/gen Makefile.inc dlfcn.c > libexec/rtld-elf Makefile debug.h rtld.c rtld.h > libexec/rtld-elf/alpha reloc.c > libexec/rtld-elf/i386 reloc.c > Added files: > lib/libc/gen dllockinit.3 > libexec/rtld-elf lockdflt.c > Log: > Add a new function dllockinit() for registering thread locking > functions to be used by the dynamic linker. This can be called by > threads packages at start-up time. I will add the call to libc_r > soon. > > Also add a default locking method that is used up until dllockinit() > is called. The default method works by blocking SIGVTALRM, SIGPROF, > and SIGALRM in critical sections. It is based on the observation > that most user-space threads packages implement thread preemption > with one of these signals (usually SIGVTALRM). > > The dynamic linker has never been reentrant, but it became less > reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c". > Starting with that revision, multiple threads each doing lazy > binding could interfere with each other. The usual symptom was > that a symbol was falsely reported as undefined at start-up time. > It was rare but not unseen. This commit fixes it. With a buildworld of CURRENT that has this commit included (built earlier today) I get the following error when trying to run applications that use the pthread-functionality, like Mozilla and Licq. ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 Abort trap (core dumped) -- -------------------- Pascal Hofstee - daeron@shadowmere.student.utwente.nl -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+: a-- C++ UB++++ P+ L- E--- W- N+ o? K- w--- O? M V? PS+ PE Y-- PGP-- t+ 5 X-- R tv+ b+ DI D- G e* h+ r- y+ ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message