FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

LinkBack Thread Tools
Old 03-29-2010, 05:56 AM
NIIBE Yutaka
Default Bug#575351: This is not the bug of GCC but glibc

No, this is not the bug of GCC. Alhough config/pa/linux-unwind.h
looks incorrect at first glance (TRAMP_SIZE is 9), it runs correctly
(because of padding).

In fact, following program runc correctly on hppa too, we see
"clean it up".

$ gcc -fexceptions -save-temps func.c test-pthread-cancel-3.c -pthread
$ ./a.out

I think that the bug is in GNU C library port of hppa.

------------------ func.c
void func (void)
for (;;
------------------ test-pthread-cancel-3.c
#include <pthread.h>
#include <time.h>

static void
clean(void *arg)
write (1, "clean it up
", 12);

extern void func(void);

static void *
f(void *arg)
pthread_cleanup_push (clean, NULL);
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
for (;
func ();
pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL);


main (int argc, char argv[])
struct timespec t;
t.tv_sec = 1;
t.tv_nsec = 0;

pthread_t tid;
pthread_create (&tid, NULL, f, NULL);

nanosleep (&t, NULL);
pthread_cancel (tid);
pthread_join (tid, NULL);

To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BB0410E.8030806@fsij.org">http://lists.debian.org/4BB0410E.8030806@fsij.org

Thread Tools

All times are GMT. The time now is 07:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org