From: Ivo Raisr Date: Sun, 17 Apr 2016 19:28:04 +0000 (+0000) Subject: Fix compiler warnings on Solaris 12 about assigning a function pointer X-Git-Tag: svn/VALGRIND_3_12_0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7407c16737eb56585b49760998261effe79d74a2;p=thirdparty%2Fvalgrind.git Fix compiler warnings on Solaris 12 about assigning a function pointer of an incompatible type to signal handler. Untyped function pointer sa_handler() is no longer available so we leverage sa_sigaction(int, siginfo_t *, void *) instead. n-i-bz git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15858 --- diff --git a/memcheck/tests/amd64-solaris/context_fpu.c b/memcheck/tests/amd64-solaris/context_fpu.c index 08f8347924..694a6b9ea2 100644 --- a/memcheck/tests/amd64-solaris/context_fpu.c +++ b/memcheck/tests/amd64-solaris/context_fpu.c @@ -14,9 +14,10 @@ static siginfo_t si; static ucontext_t uc; static float inhandler[8]; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { int i; + ucontext_t *ucp = (ucontext_t *) arg; si = *sip; uc = *ucp; @@ -50,7 +51,7 @@ int main(void) float *px = malloc(sizeof(*px)); x0 = px[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/amd64-solaris/context_fpu.stderr.exp b/memcheck/tests/amd64-solaris/context_fpu.stderr.exp index 46c87312a3..f47b338606 100644 --- a/memcheck/tests/amd64-solaris/context_fpu.stderr.exp +++ b/memcheck/tests/amd64-solaris/context_fpu.stderr.exp @@ -1,96 +1,96 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:96) + at 0x........: main (context_fpu.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:104) + at 0x........: main (context_fpu.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:50) + by 0x........: main (context_fpu.c:51) diff --git a/memcheck/tests/amd64-solaris/context_gpr.c b/memcheck/tests/amd64-solaris/context_gpr.c index 3132597561..25d4ce5c97 100644 --- a/memcheck/tests/amd64-solaris/context_gpr.c +++ b/memcheck/tests/amd64-solaris/context_gpr.c @@ -18,8 +18,10 @@ static long x0; void break_out(void); -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -43,7 +45,7 @@ int main(void) long *py = malloc(sizeof(*py)); y0 = py[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/amd64-solaris/context_gpr.stderr.exp b/memcheck/tests/amd64-solaris/context_gpr.stderr.exp index 5b922d540e..6913c55b37 100644 --- a/memcheck/tests/amd64-solaris/context_gpr.stderr.exp +++ b/memcheck/tests/amd64-solaris/context_gpr.stderr.exp @@ -1,18 +1,18 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:84) + at 0x........: main (context_gpr.c:86) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:43) + by 0x........: main (context_gpr.c:45) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:91) + at 0x........: main (context_gpr.c:93) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:43) + by 0x........: main (context_gpr.c:45) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:91) + at 0x........: main (context_gpr.c:93) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:39) + by 0x........: main (context_gpr.c:41) diff --git a/memcheck/tests/amd64-solaris/context_rflags.c b/memcheck/tests/amd64-solaris/context_rflags.c index 6d36d5f65c..c44a1c62c6 100644 --- a/memcheck/tests/amd64-solaris/context_rflags.c +++ b/memcheck/tests/amd64-solaris/context_rflags.c @@ -17,10 +17,10 @@ static siginfo_t si; static ucontext_t uc; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { si = *sip; - uc = *ucp; + uc = *((ucontext_t *) arg); } int main(void) @@ -29,7 +29,7 @@ int main(void) pid_t pid; long rflags; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/amd64-solaris/context_rflags2.c b/memcheck/tests/amd64-solaris/context_rflags2.c index 14d59284e8..62ef9dd92a 100644 --- a/memcheck/tests/amd64-solaris/context_rflags2.c +++ b/memcheck/tests/amd64-solaris/context_rflags2.c @@ -26,8 +26,10 @@ static ucontext_t uc; void break_out(void); -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -45,7 +47,7 @@ int main(void) int *px = malloc(sizeof(*px)); x1 = px[0] + 1; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/amd64-solaris/context_rflags2.stderr.exp b/memcheck/tests/amd64-solaris/context_rflags2.stderr.exp index 224ae117e6..a2d659bcdb 100644 --- a/memcheck/tests/amd64-solaris/context_rflags2.stderr.exp +++ b/memcheck/tests/amd64-solaris/context_rflags2.stderr.exp @@ -1,12 +1,12 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_rflags2.c:86) + at 0x........: main (context_rflags2.c:88) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_rflags2.c:45) + by 0x........: main (context_rflags2.c:47) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_rflags2.c:86) + at 0x........: main (context_rflags2.c:88) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_rflags2.c:45) + by 0x........: main (context_rflags2.c:47) diff --git a/memcheck/tests/amd64-solaris/context_sse.c b/memcheck/tests/amd64-solaris/context_sse.c index fa9368d72e..396950156f 100644 --- a/memcheck/tests/amd64-solaris/context_sse.c +++ b/memcheck/tests/amd64-solaris/context_sse.c @@ -18,8 +18,10 @@ static ucontext_t uc; static upad128_t x0; static upad128_t d0 = {0}; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -49,7 +51,7 @@ int main(void) upad128_t *py = malloc(sizeof(*py)); y0 = py[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/amd64-solaris/context_sse.stderr.exp b/memcheck/tests/amd64-solaris/context_sse.stderr.exp index df169c30b2..eb45ec8c73 100644 --- a/memcheck/tests/amd64-solaris/context_sse.stderr.exp +++ b/memcheck/tests/amd64-solaris/context_sse.stderr.exp @@ -1,96 +1,96 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:95) + at 0x........: main (context_sse.c:97) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:45) + by 0x........: main (context_sse.c:47) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:45) + by 0x........: main (context_sse.c:47) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:103) + at 0x........: main (context_sse.c:105) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:49) + by 0x........: main (context_sse.c:51) diff --git a/memcheck/tests/solaris/context_stack_die.c b/memcheck/tests/solaris/context_stack_die.c index 8673a91554..dd2ba43f5c 100644 --- a/memcheck/tests/solaris/context_stack_die.c +++ b/memcheck/tests/solaris/context_stack_die.c @@ -7,8 +7,9 @@ static volatile int *sp; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; sp = (int *) &ucp->uc_mcontext.gregs[0]; } @@ -20,7 +21,7 @@ int main(void) volatile int zero = 0; /* Setup a signal handler. */ - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/solaris/context_stack_die.stderr.exp b/memcheck/tests/solaris/context_stack_die.stderr.exp index 556123ed48..4bfa397e4f 100644 --- a/memcheck/tests/solaris/context_stack_die.stderr.exp +++ b/memcheck/tests/solaris/context_stack_die.stderr.exp @@ -1,5 +1,5 @@ Invalid read of size 4 - at 0x........: main (context_stack_die.c:38) + at 0x........: main (context_stack_die.c:39) Address 0x........ is on thread 1's stack .... bytes below stack pointer diff --git a/memcheck/tests/x86-solaris/context_eflags.c b/memcheck/tests/x86-solaris/context_eflags.c index 4f363f5655..c458756875 100644 --- a/memcheck/tests/x86-solaris/context_eflags.c +++ b/memcheck/tests/x86-solaris/context_eflags.c @@ -15,10 +15,10 @@ static siginfo_t si; static ucontext_t uc; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { si = *sip; - uc = *ucp; + uc = *((ucontext_t *) arg); } int main(void) @@ -27,7 +27,7 @@ int main(void) pid_t pid; int eflags; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/x86-solaris/context_eflags2.c b/memcheck/tests/x86-solaris/context_eflags2.c index c4c0f2562c..b675e0103c 100644 --- a/memcheck/tests/x86-solaris/context_eflags2.c +++ b/memcheck/tests/x86-solaris/context_eflags2.c @@ -17,8 +17,10 @@ static ucontext_t uc; void break_out(void); -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -36,7 +38,7 @@ int main(void) int *px = malloc(sizeof(*px)); x1 = px[0] + 1; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/x86-solaris/context_eflags2.stderr.exp b/memcheck/tests/x86-solaris/context_eflags2.stderr.exp index 1b38c3bc59..46095b2745 100644 --- a/memcheck/tests/x86-solaris/context_eflags2.stderr.exp +++ b/memcheck/tests/x86-solaris/context_eflags2.stderr.exp @@ -1,12 +1,12 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_eflags2.c:76) + at 0x........: main (context_eflags2.c:78) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_eflags2.c:36) + by 0x........: main (context_eflags2.c:38) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_eflags2.c:76) + at 0x........: main (context_eflags2.c:78) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_eflags2.c:36) + by 0x........: main (context_eflags2.c:38) diff --git a/memcheck/tests/x86-solaris/context_fpu.c b/memcheck/tests/x86-solaris/context_fpu.c index 6d618ff746..aa616a6805 100644 --- a/memcheck/tests/x86-solaris/context_fpu.c +++ b/memcheck/tests/x86-solaris/context_fpu.c @@ -12,9 +12,10 @@ static siginfo_t si; static ucontext_t uc; static float inhandler[8]; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { int i; + ucontext_t *ucp = (ucontext_t *) arg; si = *sip; uc = *ucp; @@ -49,7 +50,7 @@ int main(void) float *px = malloc(sizeof(*px)); x0 = px[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/x86-solaris/context_fpu.stderr.exp b/memcheck/tests/x86-solaris/context_fpu.stderr.exp index d770097684..d7a4d58ca2 100644 --- a/memcheck/tests/x86-solaris/context_fpu.stderr.exp +++ b/memcheck/tests/x86-solaris/context_fpu.stderr.exp @@ -1,96 +1,96 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:103) + at 0x........: main (context_fpu.c:104) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_fpu.c:111) + at 0x........: main (context_fpu.c:112) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_fpu.c:49) + by 0x........: main (context_fpu.c:50) diff --git a/memcheck/tests/x86-solaris/context_gpr.c b/memcheck/tests/x86-solaris/context_gpr.c index 809506f034..13e651adc0 100644 --- a/memcheck/tests/x86-solaris/context_gpr.c +++ b/memcheck/tests/x86-solaris/context_gpr.c @@ -14,8 +14,10 @@ static ucontext_t uc; /* x0 is always zero, but is visible to Valgrind as uninitialised. */ static int x0; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -37,7 +39,7 @@ int main(void) int *py = malloc(sizeof(*py)); y0 = py[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/x86-solaris/context_gpr.stderr.exp b/memcheck/tests/x86-solaris/context_gpr.stderr.exp index a77decacd5..8f7d964142 100644 --- a/memcheck/tests/x86-solaris/context_gpr.stderr.exp +++ b/memcheck/tests/x86-solaris/context_gpr.stderr.exp @@ -1,18 +1,18 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:81) + at 0x........: main (context_gpr.c:83) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:37) + by 0x........: main (context_gpr.c:39) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:88) + at 0x........: main (context_gpr.c:90) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:37) + by 0x........: main (context_gpr.c:39) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_gpr.c:88) + at 0x........: main (context_gpr.c:90) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_gpr.c:33) + by 0x........: main (context_gpr.c:35) diff --git a/memcheck/tests/x86-solaris/context_sse.c b/memcheck/tests/x86-solaris/context_sse.c index ed30120347..ae123b6091 100644 --- a/memcheck/tests/x86-solaris/context_sse.c +++ b/memcheck/tests/x86-solaris/context_sse.c @@ -16,8 +16,10 @@ static ucontext_t uc; static upad128_t x0; static upad128_t d0 = {0}; -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { + ucontext_t *ucp = (ucontext_t *) arg; + si = *sip; uc = *ucp; @@ -47,7 +49,7 @@ int main(void) upad128_t *py = malloc(sizeof(*py)); y0 = py[0]; - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset"); diff --git a/memcheck/tests/x86-solaris/context_sse.stderr.exp b/memcheck/tests/x86-solaris/context_sse.stderr.exp index 65fdb447bd..0625bc69a5 100644 --- a/memcheck/tests/x86-solaris/context_sse.stderr.exp +++ b/memcheck/tests/x86-solaris/context_sse.stderr.exp @@ -1,96 +1,96 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:101) + at 0x........: main (context_sse.c:103) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:43) + by 0x........: main (context_sse.c:45) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:43) + by 0x........: main (context_sse.c:45) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) Conditional jump or move depends on uninitialised value(s) - at 0x........: main (context_sse.c:109) + at 0x........: main (context_sse.c:111) Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (context_sse.c:47) + by 0x........: main (context_sse.c:49) diff --git a/none/tests/solaris/context_link2.c b/none/tests/solaris/context_link2.c index 9d64b6b5ee..7979b73e06 100644 --- a/none/tests/solaris/context_link2.c +++ b/none/tests/solaris/context_link2.c @@ -5,13 +5,13 @@ #include #include -static void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) +static void sighandler(int sig, siginfo_t *sip, void *arg) { ucontext_t uc2; - /* Current uc_link value has to be equal to ucp. */ + /* Current uc_link value has to be equal to (ucontext_t *) arg. */ getcontext(&uc2); - assert(uc2.uc_link == ucp); + assert(uc2.uc_link == arg); } int main(void) @@ -26,7 +26,7 @@ int main(void) } assert(!uc.uc_link); - sa.sa_handler = sighandler; + sa.sa_sigaction = sighandler; sa.sa_flags = SA_SIGINFO; if (sigfillset(&sa.sa_mask)) { perror("sigfillset");