From owner-freebsd-current Tue Nov 7 0:28:59 2000 Delivered-To: freebsd-current@freebsd.org Received: from blizzard.sabbo.net (ns.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id 9D27537B479; Tue, 7 Nov 2000 00:28:53 -0800 (PST) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.109]) by blizzard.sabbo.net (8.10.1/8.10.1) with ESMTP id eA78SoB31377; Tue, 7 Nov 2000 10:28:50 +0200 Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.11.0/8.9.3) with ESMTP id eA78SqZ85450; Tue, 7 Nov 2000 10:28:52 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Message-ID: <3A07BD43.2452FE47@FreeBSD.org> Date: Tue, 07 Nov 2000 10:28:51 +0200 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: current@FreeBSD.org, jdp@FreeBSD.org Subject: Re: Problem with dlopen()/dlsym() after recent crt* changes References: <3A066572.2CF3D7BC@FreeBSD.org> <200011061531.eA6FVv821977@vashon.polstra.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra wrote: > In article <3A066572.2CF3D7BC@FreeBSD.org>, > Maxim Sobolev wrote: > > After the crt changes the following piece of code, which worked previously, > > gives a 'host: dlopen() failed: ./module.so: Undefined symbol > > "__register_frame_info' error message (yeah, I know that it's better to check > > handle == NULL first, but it's the way some apps work). > > > > handle = dlopen("./module.so", RTLD_LAZY); > > if ((error = dlerror()) != NULL) > > { > > errx(1, "dlopen() failed: %s", error); > > /* Not reached */ > > } > > I personally think this code is broken. It's analogous to checking > errno without first testing a system call's return value. But this is the way how some programs work and our previous implementation was OK with that. > > The full sources of this testcase can be found at: > > http://people.freebsd.org/~sobomax/dlbug.tar.gz . > > OK, thanks. I'll take a look at it as soon as I can -- hopefully > tonight. If I can come up with a reasonable work-around, I'll do so. Please do, because I heard that this broke several ports, so it should be resolved as soon as possible, probably even by backing out appropriate changes from the -stable. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message