mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-05 13:27:19 +03:00
Fix "prof.reset" mallctl-related corruption.
Fix heap profiling to distinguish among otherwise identical sample sites with interposed resets (triggered via the "prof.reset" mallctl). This bug could cause data structure corruption that would most likely result in a segfault.
This commit is contained in:
parent
a306a60651
commit
a00b10735a
4 changed files with 84 additions and 20 deletions
|
|
@ -90,10 +90,11 @@ struct prof_tctx_s {
|
|||
prof_tdata_t *tdata;
|
||||
|
||||
/*
|
||||
* Copy of tdata->thr_uid, necessary because tdata may be defunct during
|
||||
* teardown.
|
||||
* Copy of tdata->thr_{uid,discrim}, necessary because tdata may be
|
||||
* defunct during teardown.
|
||||
*/
|
||||
uint64_t thr_uid;
|
||||
uint64_t thr_discrim;
|
||||
|
||||
/* Profiling counters, protected by tdata->lock. */
|
||||
prof_cnt_t cnts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue