summaryrefslogtreecommitdiff
path: root/src/thread/pthread_barrier_wait.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-08-22 14:05:10 -0400
committerRich Felker <dalias@aerifal.cx>2014-08-22 14:05:10 -0400
commita6293285e930dbdb0eff47e29b513ca22537b1a2 (patch)
tree66a43238db0d04793fd682bf79f5d23745659b20 /src/thread/pthread_barrier_wait.c
parent321f4fa9067185aa6bb47403dfba46e8cfe917d3 (diff)
downloadmusl-a6293285e930dbdb0eff47e29b513ca22537b1a2.tar.gz
fix use of uninitialized memory with application-provided thread stacks
the subsequent code in pthread_create and the code which copies TLS initialization images to the new thread's TLS space assume that the memory provided to them is zero-initialized, which is true when it's obtained by pthread_create using mmap. however, when the caller provides a stack using pthread_attr_setstack, pthread_create cannot make any assumptions about the contents. simply zero-filling the relevant memory in this case is the simplest and safest fix.
Diffstat (limited to 'src/thread/pthread_barrier_wait.c')
0 files changed, 0 insertions, 0 deletions