diff options
| author | Jason Evans <jasone@canonware.com> | 2014-10-12 20:03:20 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2014-10-12 20:03:20 (GMT) |
| commit | 44c97b712ef1669a4c75ea97e8d47c0535e9ec71 (patch) | |
| tree | 42cc54ebbb118a545803f7a5d4d49cac22d50bcc /include/jemalloc/internal | |
| parent | 381c23dd9d3bf019cc4c7523a900be1e888802a7 (diff) | |
| download | jemalloc-44c97b712ef1669a4c75ea97e8d47c0535e9ec71.zip jemalloc-44c97b712ef1669a4c75ea97e8d47c0535e9ec71.tar.gz jemalloc-44c97b712ef1669a4c75ea97e8d47c0535e9ec71.tar.bz2 | |
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')
| -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; |
