mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-27 13:22:14 +03:00
Fix a prof_tctx_t/prof_tdata_t cleanup race.
Fix a prof_tctx_t/prof_tdata_t cleanup race by storing a copy of thr_uid in prof_tctx_t, so that the associated tdata need not be present during tctx teardown.
This commit is contained in:
parent
381c23dd9d
commit
44c97b712e
2 changed files with 11 additions and 5 deletions
|
|
@ -89,6 +89,12 @@ struct prof_tctx_s {
|
|||
/* Thread data for thread that performed the allocation. */
|
||||
prof_tdata_t *tdata;
|
||||
|
||||
/*
|
||||
* Copy of tdata->thr_uid, necessary because tdata may be defunct during
|
||||
* teardown.
|
||||
*/
|
||||
uint64_t thr_uid;
|
||||
|
||||
/* Profiling counters, protected by tdata->lock. */
|
||||
prof_cnt_t cnts;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue