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()



In article <m1jvo9h-0036u5C@more.local>,
Greg A. Woods <current-users%netbsd.org@localhost> wrote:
>-=-=-=-=-=-
>
>At Tue, 14 Jul 2020 20:05:57 -0000 (UTC), christos%astron.com@localhost (Christos
>Zoulas) wrote:
>Subject: Re: recent changes to pthread_fork.c:fork() cause static
>linking to fail if the app provides its own malloc()
>>
>> It is not only _malloc_prefork(), it is also _malloc_postfork() and
>> _malloc_postfork_child(). The easiest way to fix things is to provide
>> them as no-op.
>
>Indeed.
>
>I guess this will have to be the way.  Perhaps some proper documentation
>could/should be written about how to do this and exactly what APIs are
>necessary to override the internal malloc() entirely.
>
>Note that this is necessary in cases of malloc() et al in particular
>for both static-linked and dynamic linked programs.

http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/shells/tcsh/patches/patch-tc.alloc.c?rev=1.3&content-type=text/plain



Home | Main Index | Thread Index | Old Index