mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 17:17:19 +03:00
Fix more prof_tdata resurrection corner cases.
This commit is contained in:
parent
0050a0f7e6
commit
f278994029
2 changed files with 9 additions and 7 deletions
|
|
@ -440,7 +440,7 @@ prof_lookup(prof_bt_t *bt)
|
|||
cassert(config_prof);
|
||||
|
||||
prof_tdata = prof_tdata_get();
|
||||
if (prof_tdata == NULL)
|
||||
if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
|
||||
return (NULL);
|
||||
|
||||
if (ckh_search(&prof_tdata->bt2cnt, bt, NULL, &ret.v)) {
|
||||
|
|
@ -846,7 +846,7 @@ prof_dump(bool propagate_err, const char *filename, bool leakcheck)
|
|||
cassert(config_prof);
|
||||
|
||||
prof_tdata = prof_tdata_get();
|
||||
if (prof_tdata == NULL)
|
||||
if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
|
||||
return (true);
|
||||
prof_enter(prof_tdata);
|
||||
prof_dump_fd = creat(filename, 0644);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue