summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2012-04-29 06:27:13 (GMT)
committerJason Evans <je@fb.com>2012-04-29 06:27:13 (GMT)
commitf27899402914065a6c1484ea8d81a2c8b70aa659 (patch)
tree2fc2847e01a486b709a91c8fe5f4d82c081ca315 /src
parent0050a0f7e6ea5a33c9aed769e2652afe20714194 (diff)
downloadjemalloc-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/prof.c b/src/prof.c
index e354966..de1d392 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -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);