NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/52386: pthread(3) doesn't respect PTHREAD_DESTRUCTOR_ITERATIONS



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.

Joerg


Home | Main Index | Thread Index | Old Index