diff options
author | Jason Evans <je@fb.com> | 2012-04-29 06:27:13 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-04-29 06:27:13 (GMT) |
commit | f27899402914065a6c1484ea8d81a2c8b70aa659 (patch) | |
tree | 2fc2847e01a486b709a91c8fe5f4d82c081ca315 /src | |
parent | 0050a0f7e6ea5a33c9aed769e2652afe20714194 (diff) | |
download | jemalloc-f27899402914065a6c1484ea8d81a2c8b70aa659.zip jemalloc-f27899402914065a6c1484ea8d81a2c8b70aa659.tar.gz jemalloc-f27899402914065a6c1484ea8d81a2c8b70aa659.tar.bz2 |
Fix more prof_tdata resurrection corner cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/prof.c | 4 |
1 files changed, 2 insertions, 2 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); |