mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-02 08:30:27 +03:00
Report the offending pointer on sized dealloc bug detection.
This commit is contained in:
parent
edbfe6912c
commit
f3b2668b32
5 changed files with 31 additions and 14 deletions
|
|
@ -2751,7 +2751,7 @@ maybe_check_alloc_ctx(tsd_t *tsd, void *ptr, emap_alloc_ctx_t *alloc_ctx) {
|
|||
&dbg_ctx);
|
||||
if (alloc_ctx->szind != dbg_ctx.szind) {
|
||||
safety_check_fail_sized_dealloc(
|
||||
/* current_dealloc */ true);
|
||||
/* current_dealloc */ true, ptr);
|
||||
return true;
|
||||
}
|
||||
if (alloc_ctx->slab != dbg_ctx.slab) {
|
||||
|
|
@ -2801,7 +2801,8 @@ isfree(tsd_t *tsd, void *ptr, size_t usize, tcache_t *tcache, bool slow_path) {
|
|||
if (config_opt_safety_checks) {
|
||||
/* Small alloc may have !slab (sampled). */
|
||||
if (alloc_ctx.szind != sz_size2index(usize)) {
|
||||
safety_check_fail_sized_dealloc(true);
|
||||
safety_check_fail_sized_dealloc(true,
|
||||
ptr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue