mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
use libc-internal malloc for pthread_atfork
while no lock is held here making it a lock-order issue, replacement malloc is likely to want to use pthread_atfork, possibly making the call to malloc infinitely recursive. even if not, there is no reason to prefer an application-provided malloc here.
This commit is contained in:
parent
7d358599d4
commit
9532ae1318
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
#include "libc.h"
|
||||
#include "lock.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
static struct atfork_funcs {
|
||||
void (*prepare)(void);
|
||||
void (*parent)(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue