Bug 174323 - tst-mallocfork.c uses uninit value
Summary: tst-mallocfork.c uses uninit value
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-27 22:54 UTC by John Reiser
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-28 12:42:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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:


Note You need to log in before you can comment on or make changes to this bug.