This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20198] New: quick_exit incorrectly destroys C++11 thread objects.
- From: "johan.karlsson at enea dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 03 Jun 2016 13:15:17 +0000
- Subject: [Bug libc/20198] New: quick_exit incorrectly destroys C++11 thread objects.
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20198
Bug ID: 20198
Summary: quick_exit incorrectly destroys C++11 thread objects.
Product: glibc
Version: 2.25
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: johan.karlsson at enea dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
C++11 describes that quick_exit() should not destroy thread object but since
quick_exit in glibc shares functionality with exit() it accidentally does.
In short __call_tls_dtors() should not internally be called when calling
quick_exit().
The following example should not call abort:
#include <cstdlib>
struct A
{
~A() { abort(); }
};
thread_local A a;
int
main()
{
(void)a;
// std::exit(0);
// std::_Exit(0);
std::quick_exit(0);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.