From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B779D4696C3 for ; Mon, 23 Mar 2020 13:32:54 +0300 (MSK) Date: Mon, 23 Mar 2020 10:32:53 +0000 From: Nikita Pettik Message-ID: <20200323103253.GA25473@tarantool.org> References: <20200323072444.24660-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200323072444.24660-1-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH] popen: add missing ev_io initialization List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml On 23 Mar 10:24, Cyrill Gorcunov wrote: > Otherwise it left unitialized and in result > may not work depending on dirty data got from > memory. > > Fixes #4811 > > Reported-by: Nikita Pettik > Signed-off-by: Cyrill Gorcunov > --- Hi, Applying the patch does not fix the problem, but reproduce it each time unit/ suite is executed :) > branch gorcunov/gh-4811-popen-coio > > src/lib/core/popen.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c > index a0630e3d9..99bd69b74 100644 > --- a/src/lib/core/popen.c > +++ b/src/lib/core/popen.c > @@ -115,12 +115,8 @@ handle_new(struct popen_opts *opts) > > rlist_create(&handle->list); > > - /* > - * No need to initialize the whole ios structure, > - * just set fd value to mark as unused. > - */ > for (i = 0; i < lengthof(handle->ios); i++) > - handle->ios[i].fd = -1; > + coio_create(&handle->ios[i], -1); > > say_debug("popen: alloc handle %p command '%s' flags %#x", > handle, handle->command, opts->flags); > > 2.20.1 >