aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/pthread/tst-cancel3.c
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-10-21 20:56:48 +0000
committerJoseph Myers <josmyers@redhat.com>2024-10-21 20:56:48 +0000
commitb371ed272695919a332d30bd2754a82e5e683178 (patch)
tree434b1c8e1d300cf355bb101b3817f997c6498db2 /sysdeps/pthread/tst-cancel3.c
parente68b1b1f0830a47346bc07486861e85a76621265 (diff)
downloadglibc-b371ed272695919a332d30bd2754a82e5e683178.zip
glibc-b371ed272695919a332d30bd2754a82e5e683178.tar.gz
glibc-b371ed272695919a332d30bd2754a82e5e683178.tar.bz2
Check time arguments to pthread_timedjoin_np and pthread_clockjoin_np
The pthread_timedjoin_np and pthread_clockjoin_np functions do not check that a valid time has been specified. The documentation for these functions in the glibc manual isn't sufficiently detailed to say if they should, but consistency with POSIX functions such as pthread_mutex_timedlock and pthread_cond_timedwait strongly indicates that an EINVAL error is appropriate (even if there might be some ambiguity about exactly where such a check should go in relation to other checks for whether the thread exists, whether it's immediately joinable, etc.). Copy the logic for such a check used in pthread_rwlock_common.c. pthread_join_common had some logic calling valid_nanoseconds before commit 9e92278ffad441daf588ff1ff5bd8094aa33fbfd, "nptl: Remove clockwait_tid"; I haven't checked exactly what cases that detected. Tested for x86_64 and x86.
Diffstat (limited to 'sysdeps/pthread/tst-cancel3.c')
0 files changed, 0 insertions, 0 deletions