Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Nov 2000 10:28:51 +0200
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        current@FreeBSD.org, jdp@FreeBSD.org
Subject:   Re: Problem with dlopen()/dlsym() after recent crt* changes
Message-ID:  <3A07BD43.2452FE47@FreeBSD.org>
References:  <3A066572.2CF3D7BC@FreeBSD.org> <200011061531.eA6FVv821977@vashon.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra wrote:

> In article <3A066572.2CF3D7BC@FreeBSD.org>,
> Maxim Sobolev  <sobomax@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A07BD43.2452FE47>