[PATCH] Fix tst-mallocfork
Jakub Jelinek
jakub@redhat.com
Mon Nov 28 12:45:00 GMT 2005
Hi!
As detected by valgrind, sa_flags was uninitialized when calling
sigaction. Fixed thusly.
2005-11-28 Jakub Jelinek <jakub@redhat.com>
* malloc/tst-mallocfork.c (do_test): Make sure sa_flags is
initialized. Reported by John Reiser <jreiser@BitWagon.com>.
--- libc/malloc/tst-mallocfork.c.jj 2005-09-27 07:42:06.000000000 +0200
+++ libc/malloc/tst-mallocfork.c 2005-11-28 13:28:48.000000000 +0100
@@ -22,9 +22,8 @@ do_test (void)
{
pid_t parent = getpid ();
- struct sigaction action;
+ struct sigaction action = { .sa_handler = sig_handler };
sigemptyset (&action.sa_mask);
- action.sa_handler = sig_handler;
malloc (sizeof (int));
Jakub
More information about the Libc-hacker
mailing list