This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/4509] New: pthread_kill() Segmentation Fault when TID is invalid
- From: "elciofried at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 15 May 2007 12:52:03 -0000
- Subject: [Bug nptl/4509] New: pthread_kill() Segmentation Fault when TID is invalid
- Reply-to: sourceware-bugzilla at sourceware dot org
pthread_kill should return ERROR ESRCH instead of crashes when receive a invalid
TID on parameter pthread_t thread.
This occurs on OpenSuse 10.2, with NPTL and don't occurs in Conectiva 9.
The example below never reach to the print function, it crashes on pthread_kill.
Manual:
= ERRORS
= The pthread_kill() function shall fail if:
=
= ESRCH No thread could be found corresponding to that specified by the
= given thread ID.
Example:
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
int main (int argc, char* const argv [])
{
int iRet = 0;
iRet = pthread_kill (123, 0);
printf("iRet = %d\n", iRet);
return 0;
}
--
Summary: pthread_kill() Segmentation Fault when TID is invalid
Product: glibc
Version: unspecified
Status: NEW
Severity: critical
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: elciofried at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4509
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.