]> xenbits.xensource.com Git - qemu-xen-4.6-testing.git/commitdiff
signal: Don't use uninitalised sival_ptr
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Apr 2015 13:35:45 +0000 (14:35 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Oct 2015 15:52:06 +0000 (16:52 +0100)
In 64bit builds, setting sival_int to 0 doesn't clear the upper half of the
sival_ptr pointer.  Valgrind does not like this.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
vl.c

diff --git a/vl.c b/vl.c
index 67d9d86771692b43504939fca8dcb71e372b951c..c864e7de755498c7b0326a6c9d0b6b9220df1796 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1568,7 +1568,7 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t)
 
 static int dynticks_start_timer(struct qemu_alarm_timer *t)
 {
-    struct sigevent ev;
+    struct sigevent ev = { { 0 } };
     timer_t host_timer;
     struct sigaction act;
 
@@ -1578,7 +1578,6 @@ static int dynticks_start_timer(struct qemu_alarm_timer *t)
 
     sigaction(SIGALRM, &act, NULL);
 
-    ev.sigev_value.sival_int = 0;
     ev.sigev_notify = SIGEV_SIGNAL;
     ev.sigev_signo = SIGALRM;