On 09.07.2017 22:20, Christos Zoulas wrote: > On Jul 9, 5:20pm, joerg%bec.de@localhost (Joerg Sonnenberger) wrote: > -- Subject: Re: lib/52386: pthread(3) doesn't respect PTHREAD_DESTRUCTOR_ITER > > | On Sun, Jul 09, 2017 at 03:30:00PM +0000, n54%gmx.com@localhost wrote: > | > PTHREAD_DESTRUCTOR_ITERATIONS is not respected as the maximum number of destructor iterations. > | > | The test case is incorrect. PTHREAD_DESTRUCTOR_ITERATIONS specifies a > | lower limit on the number of iterations performed. It is explicitly not > | a hard limit. To quote POSIX: > | > | Calling pthread_setspecific() from a thread-specific data destructor > | routine may result either in lost storage (after at least > | PTHREAD_DESTRUCTOR_ITERATIONS attempts at destruction) or in an infinite > | loop. > > I agree, but making the code using the iteration constant we advertise > is simple enough. > > christos > Before digging into POSIX, the attached test passes on FreeBSD, OpenBSD, Linux, Android, Darwin. Only NetBSD is distinct.
Description: OpenPGP digital signature