public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/12310] New: pthread_exit() in main thread segfaults when statically-linked
@ 2010-12-14 12:41 mrs@mythic-beasts.com
  2012-05-08 17:32 ` [Bug nptl/12310] " siddhesh at redhat dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: mrs@mythic-beasts.com @ 2010-12-14 12:41 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12310

           Summary: pthread_exit() in main thread segfaults when
                    statically-linked
           Product: glibc
           Version: 2.11
            Status: NEW
          Severity: minor
          Priority: P2
         Component: nptl
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: mrs@mythic-beasts.com


Calling pthread_exit() in the main thread segfaults in a
statically-linked executable.

$ cat pthread-exit-main.c 
#include <pthread.h>
int main() {
  pthread_exit(NULL);
  return 1;
}

$ gcc -Wall pthread-exit-main.c -o pthread-exit-main
$ ./pthread-exit-main 
$ echo $?
0
$ gcc -Wall pthread-exit-main.c -o pthread-exit-main -static -lpthread
$ ./pthread-exit-main 
Segmentation fault

$ gdb ./pthread-exit-main 
(gdb) run
Starting program: /home/mseaborn/test/pthread-exit-main 

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

This was with glibc 2.11.1 on Ubuntu Lucid.  I have also seen this
with glibc 2.9.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-30  6:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 12:41 [Bug nptl/12310] New: pthread_exit() in main thread segfaults when statically-linked mrs@mythic-beasts.com
2012-05-08 17:32 ` [Bug nptl/12310] " siddhesh at redhat dot com
2012-12-19 10:41 ` schwab@linux-m68k.org
2013-05-17 14:14 ` wintersonnenwende at yandex dot ru
2013-05-17 14:29 ` wintersonnenwende at yandex dot ru
2013-05-23 14:02 ` carlos at redhat dot com
2013-06-16 13:27 ` wintersonnenwende at yandex dot ru
2013-06-17 15:31 ` carlos at redhat dot com
2013-06-22 14:08 ` v.nikulichev at gmail dot com
2013-06-23 14:56 ` v.nikulichev at gmail dot com
2013-06-24 17:24 ` carlos at redhat dot com
2013-06-24 17:25 ` carlos at redhat dot com
2013-06-24 17:57 ` carlos at redhat dot com
2013-06-24 17:57 ` carlos at redhat dot com
2013-06-24 21:12 ` carlos at redhat dot com
2014-06-30  6:20 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).