[all-commits] [llvm/llvm-project] e61a35: [libc] Handle PTHREAD_NULL in pthread_equal (#227856)
Jeff Bailey via All-commits
all-commits at lists.llvm.org
Wed Sep 30 14:30:24 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e61a355ea7dad6311139bef70e0562d75c6fed1c
https://github.com/llvm/llvm-project/commit/e61a355ea7dad6311139bef70e0562d75c6fed1c
Author: Jeff Bailey <jbailey at raspberryginger.com>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M libc/src/__support/threads/linux/thread.cpp
M libc/src/__support/threads/thread.h
M libc/test/integration/src/pthread/pthread_equal_test.cpp
Log Message:
-----------
[libc] Handle PTHREAD_NULL in pthread_equal (#227856)
POSIX.1-2024 specifies that pthread_equal must accept PTHREAD_NULL for
either or both arguments. Previously, Thread::operator== dereferenced
attrib->tid, which crashed when passed a null or zero-initialized
pthread_t.
Compare Thread::attrib pointers directly in an inline constexpr
operator== in thread.h, matching how Thread::join and
pthread_getunique_np identify threads. Added PTHREAD_NULL test cases to
pthread_equal_test and updated file headers in the touched files.
Assisted-by: Automated tooling, human reviewed.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list