--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: -fexceptions and unwind
- From: NIIBE Yutaka <gniibe@fsij.org>
- Date: Thu, 25 Mar 2010 14:27:31 +0900
- Message-id: <4BAAF443.8020606@fsij.org>
Package: gcc-4.4-hppa-linux-gnu
Severity: normal
I think that I found (when debugging Boehm GC) a gcc bug on hppa.
Attached is a testcase program, test-pthread-cancel.c.
I test it on paer.debian.org, where the kernel is:
Linux version 2.6.32-3-parisc64 (Debian 2.6.32-9) (maks@debian.org) (gcc version 4.3.4 (GCC) ) #1 Thu Feb 25 13:08:44 UTC 2010
$ gcc -pthread test-pthread-cancel.c
$ ./a.out
clean it up
$ gcc -pthread test-pthread-cancel.c -fexceptions
$ ./a.out
$
# No output
On i486-pc-linux-gnu, we see output for both cases (with/without
-fexceptions).
It seems that signal handling has been changed after
gcc-4.4.3/gcc/config/pa/linux-unwind.h was written.
We can see the value 0x34190000 at the register rp, but not at
the register sp.
----------------------------------- test-pthread-cancel.c
#include <pthread.h>
#include <time.h>
#include <stdio.h>
static void
clean(void *arg)
{
puts ("clean it up");
}
static void *
f(void *arg)
{
struct timespec t;
t.tv_sec = 0;
t.tv_nsec = 1000;
pthread_cleanup_push (clean, NULL);
while (1)
nanosleep (&t, NULL);
pthread_cleanup_pop(1);
}
int
main (int argc, char argv[])
{
struct timespec t;
t.tv_sec = 0;
t.tv_nsec = 10000;
pthread_t tid;
pthread_create (&tid, NULL, f, NULL);
nanosleep (&t, NULL);
pthread_cancel (tid);
pthread_join (tid, NULL);
}
-----------------------------------
--
--- End Message ---
--- Begin Message ---
- To: NIIBE Yutaka <gniibe@fsij.org>
- Cc: 575351-done@bugs.debian.org
- Subject: Re: Bug#575351: [HPPA] This is not the bug of GCC but glibc
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Mon, 14 Mar 2016 18:42:01 +0100
- Message-id: <20160314174201.GA25399@aurel32.net>
- In-reply-to: <119aab441003290614v52789783o317ba9c5b7bcf92d@mail.gmail.com>
- References: <4BB0410E.8030806@fsij.org> <handler.575351.B575351.12698436615684.ackinfo@bugs.debian.org> <4BB072D6.8060805@fsij.org> <119aab441003290614v52789783o317ba9c5b7bcf92d@mail.gmail.com>
Version: 2.17-1
On 2010-03-29 09:14, Carlos O'Donell wrote:
> On Mon, Mar 29, 2010 at 5:28 AM, NIIBE Yutaka <gniibe@fsij.org> wrote:
> > I am looking the file:
> > eglibc-2.10.2/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
> >
> > It doesn't have any cfi directives. I think that it is the cause
> > of this problem.
> >
> > When adding cfi directives, it would be good to add nocancel version
> > of functions.
>
> I have now added cfi directives to both sysdep.h and sysdep-cancel.h
> for all assembly wrappers used by glibc. In addition I have also
> provided a nocancel version in sysdep-cancel.h.
>
> Once I finish testing the cfi directives I'll push this into
> libc-ports and debian can pull the changeset.
Carlos has pushed his changed in upstream version 2.15. This means they
first appear in Debian with version 2.17-1.
I am therefore closing the bug.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
--- End Message ---