summaryrefslogtreecommitdiff
path: root/rts/posix
diff options
context:
space:
mode:
authorsven.panne@aedion.de <unknown>2007-09-16 11:19:27 +0000
committersven.panne@aedion.de <unknown>2007-09-16 11:19:27 +0000
commit3db3a003331b41794a494c8db954517a5a2bf930 (patch)
tree2d5a88ececfaa566d66179851e27d41f5c9ab0c0 /rts/posix
parent684fde094dc5b064b49dbef191ca07cb9a018e45 (diff)
downloadhaskell-3db3a003331b41794a494c8db954517a5a2bf930.tar.gz
Keep valgrind happy when calling timer_create
Fill all of the sigevent structure with zeroes before individual fields are set. Although not strictly necessary, this keeps tools like valgrind from complaining about passing uninitialized data, which is a good thing. MERGE TO STABLE
Diffstat (limited to 'rts/posix')
-rw-r--r--rts/posix/Itimer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c
index 1fcfa1625e..a60f8f1295 100644
--- a/rts/posix/Itimer.c
+++ b/rts/posix/Itimer.c
@@ -42,6 +42,8 @@
# include <signal.h>
#endif
+#include <string.h>
+
/* Major bogosity:
*
* In the threaded RTS, we can't set the virtual timer because the
@@ -143,6 +145,9 @@ initTicker (nat ms, TickProc handle_tick)
{
struct sigevent ev;
+ // Keep programs like valgrind happy
+ memset(&ev, 0, sizeof(ev));
+
ev.sigev_notify = SIGEV_SIGNAL;
ev.sigev_signo = ITIMER_SIGNAL;