Fix arena_get() for (!init_if_missing && refresh_if_missing) case.
Fix arena_get() to refresh the cache as needed in the (!init_if_missing
&& refresh_if_missing) case.
This flaw was introduced by the initial arena_get() implementation,
which was part of 8bb3198f72
(Refactor/fix
arenas manipulation.).
This commit is contained in:
parent
8d0e04d42f
commit
23694b0745
@ -755,10 +755,7 @@ arena_get(tsd_t *tsd, unsigned ind, bool init_if_missing,
|
|||||||
arena = arenas_cache[ind];
|
arena = arenas_cache[ind];
|
||||||
if (likely(arena != NULL) || !refresh_if_missing)
|
if (likely(arena != NULL) || !refresh_if_missing)
|
||||||
return (arena);
|
return (arena);
|
||||||
if (init_if_missing)
|
|
||||||
return (arena_get_hard(tsd, ind, init_if_missing));
|
return (arena_get_hard(tsd, ind, init_if_missing));
|
||||||
else
|
|
||||||
return (NULL);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user