This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/20813] New: pthread_exit is inconsistent between libc and libpthread
- From: "suckfish at ihug dot co.nz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 12 Nov 2016 23:49:21 +0000
- Subject: [Bug nptl/20813] New: pthread_exit is inconsistent between libc and libpthread
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20813
Bug ID: 20813
Summary: pthread_exit is inconsistent between libc and
libpthread
Product: glibc
Version: 2.23
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: suckfish at ihug dot co.nz
CC: drepper.fsp at gmail dot com
Target Milestone: ---
The single-threaded C++ program below compiles with or without -lpthread, but
behaves differently.
The issue appears to be that libc.so provides an implementation of
pthread_exit() that does not do stack-unwinding, but the libpthread.so version
does do stack unwinding.
I believe that either behaviour complies with the standards, but it would be
nice if glibc was consistent in its behaviour.
$ g++ -o temp temp.cc -pthread && ./temp
Hi there!
$ g++ -o temp temp.cc && ./temp
(no output)
This is Fedora glibc-2.23.1-10.fc24.x86_64
-----------------------------
#include <pthread.h>
#include <stdio.h>
struct Foo {
~Foo() {
printf("Hi there!\n");
}
};
int main()
{
Foo foo;
pthread_exit(NULL);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.