From: Julian Seward Date: Tue, 18 Jun 2002 09:07:54 +0000 (+0000) Subject: Do siglongjmp, although without running cleanup handlers in the section X-Git-Tag: svn/VALGRIND_1_0_3~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73517528152d6c1c03f4fe07b7d49765863b6ee8;p=thirdparty%2Fvalgrind.git Do siglongjmp, although without running cleanup handlers in the section of stack which it skips over. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@438 --- diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c index 25688c8b9f..22799a7a9e 100644 --- a/coregrind/arch/x86-linux/vg_libpthread.c +++ b/coregrind/arch/x86-linux/vg_libpthread.c @@ -1622,11 +1622,19 @@ void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ void longjmp(jmp_buf env, int val) { - __my_pthread_testcancel(); __libc_longjmp(env, val); } +extern void __libc_siglongjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); +void siglongjmp(sigjmp_buf env, int val) +{ + kludged("siglongjmp (cleanup handlers are ignored)"); + __libc_siglongjmp(env, val); +} + + extern int __libc_send(int s, const void *msg, size_t len, int flags); __attribute__((weak)) diff --git a/coregrind/arch/x86-linux/vg_libpthread_unimp.c b/coregrind/arch/x86-linux/vg_libpthread_unimp.c index 74fc79c936..5e526571eb 100644 --- a/coregrind/arch/x86-linux/vg_libpthread_unimp.c +++ b/coregrind/arch/x86-linux/vg_libpthread_unimp.c @@ -158,7 +158,7 @@ void sem_open ( void ) { unimp("sem_open"); } void sem_timedwait ( void ) { unimp("sem_timedwait"); } void sem_unlink ( void ) { unimp("sem_unlink"); } //void sigaction ( void ) { unimp("sigaction"); } -void siglongjmp ( void ) { unimp("siglongjmp"); } +//void siglongjmp ( void ) { unimp("siglongjmp"); } //void sigwait ( void ) { unimp("sigwait"); } void __pthread_clock_gettime ( void ) { unimp("__pthread_clock_gettime"); } diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 25688c8b9f..22799a7a9e 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -1622,11 +1622,19 @@ void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ void longjmp(jmp_buf env, int val) { - __my_pthread_testcancel(); __libc_longjmp(env, val); } +extern void __libc_siglongjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); +void siglongjmp(sigjmp_buf env, int val) +{ + kludged("siglongjmp (cleanup handlers are ignored)"); + __libc_siglongjmp(env, val); +} + + extern int __libc_send(int s, const void *msg, size_t len, int flags); __attribute__((weak)) diff --git a/coregrind/vg_libpthread_unimp.c b/coregrind/vg_libpthread_unimp.c index 74fc79c936..5e526571eb 100644 --- a/coregrind/vg_libpthread_unimp.c +++ b/coregrind/vg_libpthread_unimp.c @@ -158,7 +158,7 @@ void sem_open ( void ) { unimp("sem_open"); } void sem_timedwait ( void ) { unimp("sem_timedwait"); } void sem_unlink ( void ) { unimp("sem_unlink"); } //void sigaction ( void ) { unimp("sigaction"); } -void siglongjmp ( void ) { unimp("siglongjmp"); } +//void siglongjmp ( void ) { unimp("siglongjmp"); } //void sigwait ( void ) { unimp("sigwait"); } void __pthread_clock_gettime ( void ) { unimp("__pthread_clock_gettime"); } diff --git a/vg_libpthread.c b/vg_libpthread.c index 25688c8b9f..22799a7a9e 100644 --- a/vg_libpthread.c +++ b/vg_libpthread.c @@ -1622,11 +1622,19 @@ void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ void longjmp(jmp_buf env, int val) { - __my_pthread_testcancel(); __libc_longjmp(env, val); } +extern void __libc_siglongjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); +void siglongjmp(sigjmp_buf env, int val) +{ + kludged("siglongjmp (cleanup handlers are ignored)"); + __libc_siglongjmp(env, val); +} + + extern int __libc_send(int s, const void *msg, size_t len, int flags); __attribute__((weak)) diff --git a/vg_libpthread_unimp.c b/vg_libpthread_unimp.c index 74fc79c936..5e526571eb 100644 --- a/vg_libpthread_unimp.c +++ b/vg_libpthread_unimp.c @@ -158,7 +158,7 @@ void sem_open ( void ) { unimp("sem_open"); } void sem_timedwait ( void ) { unimp("sem_timedwait"); } void sem_unlink ( void ) { unimp("sem_unlink"); } //void sigaction ( void ) { unimp("sigaction"); } -void siglongjmp ( void ) { unimp("siglongjmp"); } +//void siglongjmp ( void ) { unimp("siglongjmp"); } //void sigwait ( void ) { unimp("sigwait"); } void __pthread_clock_gettime ( void ) { unimp("__pthread_clock_gettime"); }