diff options
author | Jason Evans <jasone@canonware.com> | 2014-10-12 13:03:20 -0700 |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2014-10-12 13:03:20 -0700 |
commit | 44c97b712ef1669a4c75ea97e8d47c0535e9ec71 (patch) | |
tree | 42cc54ebbb118a545803f7a5d4d49cac22d50bcc /include/jemalloc/internal/prof.h | |
parent | 381c23dd9d3bf019cc4c7523a900be1e888802a7 (diff) | |
download | jemalloc-44c97b712ef1669a4c75ea97e8d47c0535e9ec71.tar.gz |
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.
Diffstat (limited to 'include/jemalloc/internal/prof.h')
-rw-r--r-- | include/jemalloc/internal/prof.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/jemalloc/internal/prof.h b/include/jemalloc/internal/prof.h index c801471..5103146 100644 --- a/include/jemalloc/internal/prof.h +++ b/include/jemalloc/internal/prof.h @@ -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; |