Bug 174323

Summary: tst-mallocfork.c uses uninit value
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-28 12:42:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2005-11-27 22:54:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8) Gecko/20051118 Fedora/1.5-0.5.0.rc3 Firefox/1.5

Description of problem:
Internal testcase malloc/tst-mallocfork.c uses an uninit value in a structure whose address is passed to sigaction().  This creates doubt about the validity of the rsults of the test.

Run valgrind-3.1.0 on malloc/tst-mallocfork:
==14423== Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)
==14423==    at 0x4A39D39: sigaction (sigaction.c:68)
==14423==    by 0x400FBA: do_test (tst-mallocfork.c:31)


-----malloc/tst-mallocfork.c line 25
  struct sigaction action;
  sigemptyset (&action.sa_mask);
  action.sa_handler = sig_handler;   ## action.sa_flags is not initialized

  malloc (sizeof (int));

  if (sigaction (SIGALRM, &action, NULL) != 0)
-----

Version-Release number of selected component (if applicable):
glibc-2.3.90-18

How reproducible:
Always

Steps to Reproduce:
1. Run internal testcase malloc/tst-mallocfork under valgrind.
2.
3.
  

Actual Results:  memcheck complains that act->sa_flags is uninit.

Expected Results:  No complaints.

Additional info: