From 781dec8f80de39b44fd3a9211b1e31a44b1030c8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 24 Aug 2015 19:10:06 +0000 Subject: [PATCH] Restore signal masks when recovering from xend related signals git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15587 --- helgrind/tests/safe-pthread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helgrind/tests/safe-pthread.h b/helgrind/tests/safe-pthread.h index 0634ef6163..97615cb2b1 100644 --- a/helgrind/tests/safe-pthread.h +++ b/helgrind/tests/safe-pthread.h @@ -15,7 +15,7 @@ static jmp_buf env; static void sigill_handler( int signum, siginfo_t *siginfo, void *sigcontext ) { unsigned char *pc = siginfo->si_addr; assert( pc[0] == 0x0f && pc[1] == 0x01 && pc[2] == 0xd5 ); - longjmp( env, EPERM ); + siglongjmp( env, EPERM ); } /* @@ -25,7 +25,7 @@ static void sigill_handler( int signum, siginfo_t *siginfo, void *sigcontext ) { * just zero, so we cannot add an assert/sanity check. */ static void segv_handler( int signum, siginfo_t *siginfo, void *sigcontext ) { - longjmp( env, EPERM ); + siglongjmp( env, EPERM ); } /* @@ -54,7 +54,7 @@ static int safe_pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { sigaction( SIGSEGV, &sa_segv, &oldsa_segv ); - if ( ( r = setjmp( env ) ) == 0 ) { + if ( ( r = sigsetjmp( env, 1 ) ) == 0 ) { r = pthread_rwlock_unlock( rwlock ); } else { r = 0; -- 2.47.2