This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/11331] New: pthread_cancel() segfaults with an uninitialized thread descriptor
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 26 Feb 2010 23:59:31 -0000
- Subject: [Bug nptl/11331] New: pthread_cancel() segfaults with an uninitialized thread descriptor
- Reply-to: sourceware-bugzilla at sourceware dot org
The following code, though it is clearly invalid, segfaults instead of failing
with -ESRCH. The GLIBC tries to detect invalid thread descriptors, but fails to
catch the uninitialized case. Other libc (e.g. BSD) are able to handle that.
#include <pthread.h>
static pthread_t p;
int main(void)
{
pthread_cancel(p);
}
--
Summary: pthread_cancel() segfaults with an uninitialized thread
descriptor
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: aurelien at aurel32 dot net
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=11331
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.