mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
Fix assert in free fastpath
rtree_szind_slab_read_fast() may have not initialized alloc_ctx.szind, unless after confirming the return is true.
This commit is contained in:
parent
259b15dec5
commit
13e88ae970
1 changed files with 1 additions and 1 deletions
|
|
@ -2744,12 +2744,12 @@ bool free_fastpath(void *ptr, size_t size, bool size_hint) {
|
|||
bool res = rtree_szind_slab_read_fast(tsd_tsdn(tsd), &extents_rtree,
|
||||
rtree_ctx, (uintptr_t)ptr,
|
||||
&alloc_ctx.szind, &alloc_ctx.slab);
|
||||
assert(alloc_ctx.szind != SC_NSIZES);
|
||||
|
||||
/* Note: profiled objects will have alloc_ctx.slab set */
|
||||
if (!res || !alloc_ctx.slab) {
|
||||
return false;
|
||||
}
|
||||
assert(alloc_ctx.szind != SC_NSIZES);
|
||||
} else {
|
||||
/*
|
||||
* Check for both sizes that are too large, and for sampled objects.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue