tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: recent changes to pthread_fork.c:fork() cause static linking to fail if the app provides its own malloc()



On Thu, Jul 16, 2020 at 08:28:29PM +0100, David Brownlee wrote:
> On Thu, 16 Jul 2020 at 15:40, Christos Zoulas <christos%astron.com@localhost> wrote:
> >
> > In article <7171.1594774550%splode.eterna.com.au@localhost>,
> > matthew green  <mrg%eterna.com.au@localhost> wrote:
> > >Martin Husemann writes:
> > >> On Tue, Jul 14, 2020 at 02:49:00AM +0200, Joerg Sonnenberger wrote:
> > >> > Replacing malloc is just as invalid from a strict standard compliance
> > >> > perspective, so *shrug*
> > >>
> > >> Why is that?
> > >>
> > >> We have e.g. shells/standalone-tcsh that does it. Is it broken now?
> > >
> > >it was, yes.  i worked around it a few days ago.
> >
> > I fixed it by adding the 3 functions to tc.alloc.c both in pkgsrc and
> > upstream.
> 
> Would it be reasonable to have a tiny -lmallocstubs that contains the
> functions needed to stub out malloc to work with static linking? So
> third party apps do not need to play "guess the stubs" across
> different NetBSD versions...

That would kind of defeat the purpose. Static linking doesn't exclude
pthread for example.

Joerg


Home | Main Index | Thread Index | Old Index