[PATCH] server: Fix Error found with Valgrind

Andreas Pickart Wine-Devel at APic.Name
Wed Sep 29 10:21:57 CDT 2021


Hi,

currently i am trying to find and fix Errors occuring with (at first)
winemine when run through Valgrind. This is my first Patch:

Patch against Wine version 6.18-gde7adacedbdd78fd1ed8ee0986a78670e11a60bc

server: Fix Error found with Valgrind:
==14116== Conditional jump or move depends on uninitialised value(s)
==14116==    at 0x164AF0: req_select (thread.c:1585)
==14116==    by 0x15701F: call_req_handler (request.c:312)
==14116==    by 0x157257: read_request (request.c:367)
==14116==    by 0x1615B3: thread_poll_event (thread.c:393)
==14116==    by 0x12BD8A: fd_poll_event (fd.c:548)
==14116==    by 0x12C070: main_loop_epoll (fd.c:642)
==14116==    by 0x12C63B: main_loop (fd.c:998)
==14116==    by 0x13769A: main (main.c:149)
==14116==  Uninitialised value was created by a client request
==14116==    at 0x13E8A5: mark_block_uninitialized (object.c:110)
==14116==    by 0x13E92D: mem_alloc (object.c:120)
==14116==    by 0x13EBDD: alloc_object (object.c:199)
==14116==    by 0x141100: create_process (process.c:623)
==14116==    by 0x157AB9: master_socket_poll_event (request.c:587)
==14116==    by 0x12BD8A: fd_poll_event (fd.c:548)
==14116==    by 0x12C070: main_loop_epoll (fd.c:642)
==14116==    by 0x12C63B: main_loop (fd.c:998)
==14116==    by 0x13769A: main (main.c:149)

diff --git a/server/process.c b/server/process.c
index 8109fbe8de4..e07a5736f02 100644
--- a/server/process.c
+++ b/server/process.c
@@ -639,6 +639,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
     process->is_system       = 0;
     process->debug_children  = 1;
     process->is_terminating  = 0;
+    process->machine         = IMAGE_FILE_MACHINE_UNKNOWN;
     process->imagelen        = 0;
     process->image           = NULL;
     process->job             = NULL;



More information about the wine-devel mailing list