From owner-freebsd-current Mon Nov 6 7:32: 1 2000 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id AFA1C37B4C5; Mon, 6 Nov 2000 07:31:58 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id HAA04674; Mon, 6 Nov 2000 07:31:57 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.0/8.11.0) id eA6FVv821977; Mon, 6 Nov 2000 07:31:57 -0800 (PST) (envelope-from jdp) Date: Mon, 6 Nov 2000 07:31:57 -0800 (PST) Message-Id: <200011061531.eA6FVv821977@vashon.polstra.com> To: current@freebsd.org From: John Polstra Reply-To: current@freebsd.org Cc: sobomax@freebsd.org Subject: Re: Problem with dlopen()/dlsym() after recent crt* changes In-Reply-To: <3A066572.2CF3D7BC@FreeBSD.org> References: <3A066572.2CF3D7BC@FreeBSD.org> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. > 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. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message