This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [ranty@atdot.org: Bug#76242: libc6: broken pthread.h]
>
> Heh, Ulrich will have a good laugh over this ``fix'', as I'm having now. :)
>
> The whole point of pthread_cleanup_push is to open a statement block, which is
> closed by the matching pthread_cleanup_pop. So the error, I imagine, must be in
> some program written by ranty@atdot.org, which likely does not have proper
> nesting of pushes and pops.
>
> The above fix will cause undefined behavior, because the auto variable _buffer
> is pushed onto the cleanup stack, and then it is destroyed when the statement
> block terminates. Definitely not the kind of thing you want glibc to be doing!
>
Fair enough. I'm not familiar with pthreads, which is why I wanted to send
it past here before I made any comment.
Thanks,
Ben
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'