uninitialized reference in wineconsole in call to WriteConsoleInput?

Dan Kegel dank at kegel.com
Sat Nov 15 16:49:38 CST 2008


One more of the 100 valgrind warnings; this one is
in kernel32/tests/console.c (but really in wineconsole).
It's code Eric wrote six years ago, and the fix might be
as straightforward as using memcpy(&ir, 0, sizeof(ir)) in
WCUSER_GenerateMouseInputRecord().
Is there a better fix?

Short form:

SyscallParam wine_server_call WriteConsoleInputW
WCUSER_GenerateMouseInputRecord WCUSER_Proc call_window_proc
WINPROC_call_window DispatchMessageW WCUSER_MainLoop WinMain main

Long form:

  <kind>SyscallParam</kind>
  <what>Syscall param writev(vector[...]) points to uninitialised byte(s)</what>
  <stack>
    <frame>
      <obj>dlls/ntdll/ntdll.dll.so</obj>
      <fn>wine_server_call</fn>
      <dir>dlls/ntdll</dir>
      <file>server.c</file>
      <line>248</line>
    </frame>
    <frame>
      <obj>dlls/kernel32/kernel32.dll.so</obj>
      <fn>WriteConsoleInputW</fn>
      <dir>dlls/kernel32/../../include/wine</dir>
      <file>server.h</file>
      <line>61</line>
    </frame>
    <frame>
      <obj>programs/wineconsole/wineconsole.exe.so</obj>
      <fn>WCUSER_GenerateMouseInputRecord</fn>
      <dir>programs/wineconsole</dir>
      <file>user.c</file>
      <line>1087</line>
    </frame>
    <frame>
      <obj>programs/wineconsole/wineconsole.exe.so</obj>
      <fn>WCUSER_Proc</fn>
      <dir>programs/wineconsole</dir>
      <file>user.c</file>
      <line>1186</line>
    </frame>
    <frame>
      <obj>dlls/user32/user32.dll.so</obj>
    </frame>
    <frame>
      <obj>dlls/user32/user32.dll.so</obj>
      <fn>call_window_proc</fn>
      <dir>dlls/user32</dir>
      <file>winproc.c</file>
      <line>458</line>
    </frame>
    <frame>
      <obj>dlls/user32/user32.dll.so</obj>
      <fn>WINPROC_call_window</fn>
      <dir>dlls/user32</dir>
      <file>winproc.c</file>
      <line>2212</line>
    </frame>
    <frame>
      <obj>dlls/user32/user32.dll.so</obj>
      <fn>DispatchMessageW</fn>
      <dir>dlls/user32</dir>
      <file>message.c</file>
      <line>3108</line>
    </frame>
    <frame>
      <obj>programs/wineconsole/wineconsole.exe.so</obj>
      <fn>WCUSER_MainLoop</fn>
      <dir>programs/wineconsole</dir>
      <file>user.c</file>
      <line>1378</line>
    </frame>
  <origin>
  <what>Uninitialised value was created by a stack allocation</what>
  <stack>
    <frame>
      <obj>programs/wineconsole/wineconsole.exe.so</obj>
      <fn>WCUSER_GenerateMouseInputRecord</fn>
      <dir>programs/wineconsole</dir>
      <file>user.c</file>
      <line>1066</line>
    </frame>
  </stack>
  </origin>



More information about the wine-devel mailing list