Subject: Re: Odd problem w/ tcsh
To: None <Havard.Eidnes@runit.sintef.no>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: port-pmax
Date: 02/11/1998 09:58:03
On Wed, 11 Feb 1998 Havard.Eidnes@runit.sintef.no wrote:
> > Thanks for mentioning the relevant #define.
> >
> > But, umm, it's not quite `the correct solution'. tcsh's won built-in
> > malloc should work. It does work on other NetBSD ports. It's a bug
> > that it doesn't. The same bug seems to affect other programs (resize,
> > perl) in more pernicious ways.
>
> Folks, go read the README file. For those of you too lazy to do
> so by yourselves, I'll quote the relevant section:
>
> > On BSDreno, in ttyname() closedir() is called twice and so the same
> > pointer gets free'd twice. tcsh's malloc is picky and it prints an
> > error message to that effect. If you don't like the message:
> >
> > 1. Apply the following patch:
[snip]
> > Or: Comment the error printing out in tc.alloc.c
> > Or: Compile -DSYSMALLOC
>
> So... On inspection of the relevant piece of code in NetBSD's C
> library, I can't find the above mentioned defect. So to hunt the
> bug down, set a breakpoing at the error message printout in
> tc.alloc.c and find out who is freeing a pointer twice or where a
> related memory allocation problem exists.
I think Jonathan's point is that the exact same source is fine on other
NetBSD ports. Thus the problem's something port-pmax specific.
My guess is that the problem's one of the library calls is returning
memory allocated by the system malloc rather than the program's malloc.
Basically something's up in how symbols get resolved.
Unortunatly I can't do more than guess. :-)
Take care,
Bill