From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (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 6447645C319 for ; Mon, 23 Mar 2020 13:44:20 +0300 (MSK) Date: Mon, 23 Mar 2020 10:44:19 +0000 From: Nikita Pettik Message-ID: <20200323104419.GB25473@tarantool.org> References: <20200323072444.24660-1-gorcunov@gmail.com> <20200323103253.GA25473@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200323103253.GA25473@tarantool.org> 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:32, Nikita Pettik wrote: > 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 :) Sorry, I was wrong, still fails occasionally. > > 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 > >