Fix extent_recycle() to exclude other arenas' extents.
When attempting to recycle an extent at a specified address, check that the extent belongs to the correct arena.
This commit is contained in:
parent
1cb399b630
commit
bc49157d21
@ -408,7 +408,8 @@ extent_recycle(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks,
|
|||||||
if (elm != NULL) {
|
if (elm != NULL) {
|
||||||
extent = rtree_elm_read_acquired(tsdn, &extents_rtree,
|
extent = rtree_elm_read_acquired(tsdn, &extents_rtree,
|
||||||
elm);
|
elm);
|
||||||
if (extent != NULL && (extent_active_get(extent) ||
|
if (extent != NULL && (extent_arena_get(extent) != arena
|
||||||
|
|| extent_active_get(extent) ||
|
||||||
extent_retained_get(extent) == cache))
|
extent_retained_get(extent) == cache))
|
||||||
extent = NULL;
|
extent = NULL;
|
||||||
rtree_elm_release(tsdn, &extents_rtree, elm);
|
rtree_elm_release(tsdn, &extents_rtree, elm);
|
||||||
|
Loading…
Reference in New Issue
Block a user