Package: valgrind
Version: 1:3.2.3-1
Severity: normal
Tags: patch:

Hi,

valgrind outputs a spurious warning on

ioctl(fd,VT_GETSTATE,&vt_stat);

==19992== Syscall param ioctl(VT_GETSTATE) points to uninitialised byte(s)
==19992==    at 0x500AAB7: ioctl (in /lib/libc-2.5.so)

The vt_stat structure is not read by the kernel, and hence doesn't need
to be initialized.  The attached patch fixes that.

Samuel

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-686 (SMP w/2 CPU cores)
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages valgrind depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries

Versions of packages valgrind recommends:
ii  gdb                        6.4.90.dfsg-1 The GNU Debugger

-- no debconf information

-- 
Samuel Thibault <[EMAIL PROTECTED]>
--- ./coregrind/m_syswrap/syswrap-generic.c.orig        2007-05-12 
02:44:50.000000000 +0200
+++ ./coregrind/m_syswrap/syswrap-generic.c     2007-05-12 02:44:58.000000000 
+0200
@@ -4011,7 +4011,6 @@
       PRE_MEM_READ( "ioctl(VT_SETMODE)", ARG3, sizeof(struct vki_vt_mode) );
       break;
    case VKI_VT_GETSTATE:
-      PRE_MEM_READ( "ioctl(VT_GETSTATE)", ARG3, sizeof(struct vki_vt_stat) );
       PRE_MEM_WRITE( "ioctl(VT_GETSTATE).v_active",
                      (Addr) &(((struct vki_vt_stat*) ARG3)->v_active),
                      sizeof(((struct vki_vt_stat*) ARG3)->v_active));

Reply via email to