mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-18 08:31:46 +03:00
Fix an infinite recursion bug related to a0/tsd bootstrapping.
This resolves #184.
This commit is contained in:
parent
51f86346c0
commit
24057f3da8
1 changed files with 3 additions and 1 deletions
|
|
@ -254,7 +254,9 @@ chunk_alloc_default(void *new_addr, size_t size, size_t alignment, bool *zero,
|
|||
{
|
||||
arena_t *arena;
|
||||
|
||||
arena = arena_get(tsd_fetch(), arena_ind, false, true);
|
||||
/* Dodge tsd for a0 in order to avoid bootstrapping issues. */
|
||||
arena = (arena_ind == 0) ? a0get() : arena_get(tsd_fetch(), arena_ind,
|
||||
false, true);
|
||||
/*
|
||||
* The arena we're allocating on behalf of must have been initialized
|
||||
* already.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue