aboutsummaryrefslogtreecommitdiff
path: root/stdlib/putenv.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-04-13 14:08:24 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-04-13 14:10:09 -0500
commit00cd4dad175f648783f808aef681d16c10fc34fa (patch)
tree450601cb08266cb10f4b0dc3a99a5e505f4beae4 /stdlib/putenv.c
parentc252c193e2583e4506b141d052df29a0987ac290 (diff)
downloadglibc-00cd4dad175f648783f808aef681d16c10fc34fa.tar
glibc-00cd4dad175f648783f808aef681d16c10fc34fa.tar.gz
glibc-00cd4dad175f648783f808aef681d16c10fc34fa.tar.bz2
glibc-00cd4dad175f648783f808aef681d16c10fc34fa.zip
malloc: Fix attached thread reference count handling [BZ #19243]
reused_arena can increase the attached thread count of arenas on the free list. This means that the assertion that the reference count is zero is incorrect. In this case, the reference count initialization is incorrect as well and could cause arenas to be put on the free list too early (while they still have attached threads). * malloc/arena.c (get_free_list): Remove assert and adjust reference count handling. Add comment about reused_arena interaction. (reused_arena): Add comments abount get_free_list interaction. * malloc/tst-malloc-thread-exit.c: New file. * malloc/Makefile (tests): Add tst-malloc-thread-exit. (tst-malloc-thread-exit): Link against libpthread. (cherry picked from commit 3da825ce483903e3a881a016113b3e59fd4041de)
Diffstat (limited to 'stdlib/putenv.c')
0 files changed, 0 insertions, 0 deletions