This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/11331] New: pthread_cancel() segfaults with an uninitialized thread descriptor


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]