This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/12310] New: pthread_exit() in main thread segfaults when statically-linked
- From: "mrs at mythic-beasts dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 11 Dec 2010 23:15:14 +0000
- Subject: [Bug nptl/12310] New: pthread_exit() in main thread segfaults when statically-linked
- Auto-submitted: auto-generated
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.