summaryrefslogtreecommitdiffstats
path: root/test/integration/aligned_alloc.c
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2011-02-14 02:11:54 (GMT)
committerJason Evans <je@fb.com>2011-02-14 02:11:54 (GMT)
commit9dcad2dfd11762ea3b542ef45a20bd8297c6f18c (patch)
treef2ce6dda64a1c952aa79e891ad8a6f0d632e7967 /test/integration/aligned_alloc.c
parent6369286f83e800de8753732031289fd6393027e7 (diff)
downloadjemalloc-9dcad2dfd11762ea3b542ef45a20bd8297c6f18c.zip
jemalloc-9dcad2dfd11762ea3b542ef45a20bd8297c6f18c.tar.gz
jemalloc-9dcad2dfd11762ea3b542ef45a20bd8297c6f18c.tar.bz2
Fix "thread.{de,}allocatedp" mallctl.
For the non-TLS case (as on OS X), if the "thread.{de,}allocatedp" mallctl was called before any allocation occurred for that thread, the TSD was still NULL, thus putting the application at risk of dereferencing NULL. Fix this by refactoring the initialization code, and making it part of the conditional logic for all per thread allocation counter accesses.
Diffstat (limited to 'test/integration/aligned_alloc.c')
0 files changed, 0 insertions, 0 deletions