[PATCH] Call malloc_tsd_boot0 from malloc_init_hard_recursible

Cosmin Paraschiv cparaschiv at ixiacom.com
Wed Nov 18 08:02:00 PST 2015


When using LinuxThreads, malloc bootstrapping deadlocks, since malloc_tsd_boot0
ends up calling pthread_setspecific, which causes recursive allocation. Fix it,
by moving the malloc_tsd_boot0 call to malloc_init_hard_recursible.

The deadlock has been introduced by commit 8bb3198f72, when tsd_boot was split
and the top half, tsd_boot0, got an extra tsd_wrapper_set call.

Signed-off-by: Cosmin Paraschiv <cparaschiv at ixiacom.com>
---
 src/jemalloc.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Call-malloc_tsd_boot0-from-malloc_init_hard_recursib.patch
Type: text/x-patch
Size: 1569 bytes
Desc: not available
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20151118/7a700a9a/attachment.bin>


More information about the jemalloc-discuss mailing list