Remove ESRCH from pthread_* man pages or document it as nonstandard

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

 



Use of a pthread_t after its lifetime has ended is undefined behavior.
Pre-2008 POSIX wrongly had ESRCH errors specified for a number of
interfaces, conflicting with explicitly making such use UB; this was
fixed as a result of Austin Group interpretation 142:

https://collaboration.opengroup.org/austin/interps/documents/14366/AI-142.txt

However, the man pages still have ESRCH listed for most if not all of
the pthread_* interfaces that take a pthread_t argument.

Could this be removed, or annotated to clarify that (1) this is not
standard/portable behavior programmers can rely on (FYI: musl does not
do it), and (2) like all instances of the pattern "use of resource
identifier after the resource it refers to has been released/freed",
passing a pthread_t whose lifetime may have ended is inherently a bug.

This came up again on the musl mailing list today:

https://www.openwall.com/lists/musl/2020/02/10/3

Rich



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux