This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A bug in the dynamic linker


On Mon, Jun 25, 2001 at 09:13:39PM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > _dl_catch_error has
> > 
> >   /* We get here only if we longjmp'd out of OPERATE.  */
> >   tsd_setspecific (old);
> >   *objname = c.objname;
> >   *errstring = c.errstring;
> >   return errcode == -1 ? 0 : errcode;
> > 
> > _dl_signal_error will set the env fieldd to -1 if errcode == 0. In
> > that case, _dl_catch_error will return 0.
> 
> Since you haven't given more context (especially, where
> _dl_catch_error is called) I cannot analyze this more.  I looked at
> some code and found the uses of this function in dl-deps.c not
> correct.  I've fixed this.  But not the way you did.
> 
> The way _dl_catch_error is used is strange (at best).  It has
> historical reasons and should be cleaned up some day.  But not now.
> Stabilization is key.
> 
> Take a look at the changes I just checked in and let me know whether
> they solve your problem.  And if possible, provide a test case.
> 

I will check it out. I noticed the problem when I was cross-compiling
to Linux/mips. Since /usr/bin/tcl in RedHat 7.1 has DT_RPATH set to
"", it tried to load the DSO for Linux/mips in the current directory.
/usr/bin/tcl dumped core. It took me a while to figure out what
was going on. The dynamic linker tried to signal an error. But
it was ignored since errcode == 0.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]