This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Update catch(...) handlers to deal with __forced_unwind
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 6 Jun 2014 10:19:59 +0100
- Subject: Re: [patch] Update catch(...) handlers to deal with __forced_unwind
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4aoWvH_Gg9hLpfvBRwoZhiyqOT2sxE+grHoTdxT_+NGoA at mail dot gmail dot com>
On 06/06/14 10:27 +0200, Uros Bizjak wrote:
These two tests timeout on alpha-linux-gnu:
FAIL: 30_threads/async/forced_unwind.cc execution test
WARNING: program timed out.
FAIL: 30_threads/packaged_task/forced_unwind.cc execution test
WARNING: program timed out.
Sorry about that, I don't know why.
Does pthread_exit(0) use a __forced_unwind exception on
alpha-linux-gnu? This should tell you ...
#include <bits/cxxabi_forced.h>
#include <pthread.h>
void* f(void*) {
try
{
pthread_exit(0);
}
catch (__cxxabiv1::__forced_unwind const&)
{
__builtin_puts("unwind");
throw;
}
catch (...)
{
__builtin_puts("something else");
throw;
}
}
int main()
{
pthread_t t;
pthread_create(&t, 0, f, 0);
pthread_join(t, 0);
}
[pid 18326] futex(0x2000027a1f4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 18326] futex(0x12001a08c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 18326] madvise(0x20000454000, 8355840, MADV_DONTNEED) = 0
[pid 18326] exit(0) = ?
[pid 18326] +++ exited with 0 +++
<... futex resumed> ) = 0
futex(0x12001a098, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x12001a05c, FUTEX_WAIT_PRIVATE, 1, NULL
... the test hangs here ...
Could I get a stack trace of the remaining thread at that point?