Subject: Re: dynamic linker/loader problem
To: Christos Zoulas <>
From: Rafal Boni <>
List: tech-toolchain
Date: 03/25/2003 20:09:16
In message <>, you write: 

-> In article <>,
-> Jason Thorpe <> wrote:
-> >
-> >On Tuesday, March 25, 2003, at 12:57  PM, Manuel Bouyer wrote:
-> >
-> >> Any idea ?
-> >
-> >If nothing else, please file a PR about this problem.  There is 
-> >apparently another outstanding bug with ld.elf_so on MIPS that causes 
-> >tcsh to crash (right, christos?), and I'm not sure a PR has been filed 
-> >for that, either.
-> Yes, mips does not resolve symbols properly, and there are 2/3 pr's out
-> about it. the code from libc ends up calling the real malloc and free,
-> where the tcsh code ends up calling the ones provided by tcsh. This
-> used to work... And should be fixed before the release.

PR's 19183, 18657, 20078 (should be closed as dup?) 
Agreed that it should be fixed before release... I think the problem is
slightly different than you describe it, but the end-result the same..
Some child routines of tgetent (cgetstr, for example) allocate memory,
which uses the libc malloc (even though bash/tcsh provide their own).
So far, so good, but when the termcap code then *frees* that memory, 
it does so using the bash/tcsh free(), which whiles and in some cases
crashes the shell.

-> >I think the one I'm thinking of is actually a regression -- i.e. it 
-> >worked fine once, but some recent changes to ld.elf_so broke it.

It's definitely a regression... tcsh was one of the first packages I
built (mmm, being slave to a shell 8-) when I got the IP22 code booting
multi-user and it's worked through various toolchains and tweaks to the
ELF dynamic linker until the last set of changes.

There seems to be another issue in that running a -current kernel makes
the old fall over.  This really sucks when you want to try out
a new kernel, and should probably also be fixed before the next release.


Rafal Boni                                           
  We are all worms.  But I do believe I am a glowworm.  -- Winston Churchill