public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "xogusgalaxy at yahoo dot co dot kr" <sourceware-bugzilla@sources.redhat.com> To: glibc-bugs@sources.redhat.com Subject: [Bug nptl/784] New: pthread_join causes a segmentation fault when it is called in catch block Date: Fri, 11 Mar 2005 02:38:00 -0000 [thread overview] Message-ID: <20050311023809.784.xogusgalaxy@yahoo.co.kr> (raw) I've found the pthread_join() function seems to cause a segmentation fault when one thread throws an exception and the other thread waits for its termination in its own catch block. This is a simple source code. #include <pthread.h> void* thread1(void* arg) { try { /* Throw an exception and terminate this thread.*/ throw 1; } catch (...) { } } int main(int argc, char* argv[]) { pthread_t tid = 0; try { pthread_create(&tid, NULL, thread1, 0); throw 1; // Throw an exception } catch (...) { /* Wait for child thread's termination in catch block. */ if (tid) pthread_join(tid, NULL); // This causes segmentation fault. } return 0; } Here is my g++ version that compiled the source code. gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) Backtrace of core file: #0 0x400aed0f in __cxa_end_catch () from /usr/lib/libstdc++.so.5 #1 0x080486d2 in main (argc=1, argv=0xbfffda74) at main.cpp:19 <-- pthread_join #2 0x42015504 in __libc_start_main () from /lib/tls/libc.so.6 -- Summary: pthread_join causes a segmentation fault when it is called in catch block Product: glibc Version: unspecified Status: NEW Severity: critical Priority: P1 Component: nptl AssignedTo: drepper at redhat dot com ReportedBy: xogusgalaxy at yahoo dot co dot kr CC: glibc-bugs at sources dot redhat dot com http://sources.redhat.com/bugzilla/show_bug.cgi?id=784 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next reply other threads:[~2005-03-11 2:38 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-03-11 2:38 xogusgalaxy at yahoo dot co dot kr [this message] 2005-03-15 7:50 ` [Bug nptl/784] " jakub at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050311023809.784.xogusgalaxy@yahoo.co.kr \ --to=sourceware-bugzilla@sources.redhat.com \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).