Subject: Re: dynamic linker/loader problem
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-toolchain
Date: 03/26/2003 20:52:52
In article <20030326205004.GA690@antioche.eu.org>,
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
>On Tue, Mar 25, 2003 at 08:09:16PM -0500, Rafal Boni wrote:
>> 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 tried to reproduce the problem with a simple test case, but failed.
>Each time the local function is called, instead of the libc's one.
>It seems to require some special conditions to happen ...

try:
make malloc.c, that has malloc and free in it.
make main.c: call termcap routines that allocate space.
cc main.c malloc.c

christos