Torvald Riegel wrote:
> The double-checked locking in glthread_once_multithreaded is broken. It
> has data races. Remember the conversation we had about atomics? Look
> at glibc's pthread_once to see what needs to be done.
>
> A similar problem exists regarding the (use of the) initialized fiel
On Thu, 2017-01-05 at 22:09 +0100, Bruno Haible wrote:
> Torvald Riegel wrote:
> > > Can you give line numbers, please? lib/glthread/lock.c and
> > > lib/glthread/cond.c
> > > are large files. If you have found bugs there, *of course* I want to have
> > > them fixed.
> >
> > I can understand both
Torvald Riegel wrote:
> > Can you give line numbers, please? lib/glthread/lock.c and
> > lib/glthread/cond.c
> > are large files. If you have found bugs there, *of course* I want to have
> > them fixed.
>
> I can understand both points. However, I'd suggest that you first try
> to find them (or
On Thu, 2017-01-05 at 20:15 +0100, Bruno Haible wrote:
> Torvald Riegel wrote:
> > I found two bugs just by briefly scanning through the current
> > lib/glthread/lock.c. As a hint, I'll just mention double-checked
> > locking and order of destruction. And skipping destruction is of course
> > not
Torvald Riegel wrote:
> I found two bugs just by briefly scanning through the current
> lib/glthread/lock.c. As a hint, I'll just mention double-checked
> locking and order of destruction. And skipping destruction is of course
> not correct in the general case either (unless I'm misreading
> lib/