Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 92186 invoked from network); 20 Oct 2006 07:16:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 07:16:33 -0000 Received: (qmail 36049 invoked by uid 500); 20 Oct 2006 07:16:30 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 35870 invoked by uid 500); 20 Oct 2006 07:16:29 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 35858 invoked by uid 99); 20 Oct 2006 07:16:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 00:16:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [134.134.136.24] (HELO mga09.intel.com) (134.134.136.24) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 00:16:28 -0700 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by mga09.intel.com with ESMTP; 20 Oct 2006 00:16:08 -0700 Received: from fmsmsx331.fm.intel.com (HELO fmsmsx331.amr.corp.intel.com) ([132.233.42.156]) by orsmga001.jf.intel.com with ESMTP; 20 Oct 2006 00:16:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,332,1157353200"; d="scan'208"; a="147931284:sNHT282934617" Received: from fmsmsx311.amr.corp.intel.com ([132.233.42.214]) by fmsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 20 Oct 2006 00:16:03 -0700 Received: from mssmsx411.ccr.corp.intel.com ([10.125.2.10]) by fmsmsx311.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 20 Oct 2006 00:16:03 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: HARMONY-1752: patch review Date: Fri, 20 Oct 2006 11:16:00 +0400 Message-ID: <8E389A5F2FEABA4CB1DEC35A25CB39CE5E486E@mssmsx411> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: HARMONY-1752: patch review thread-index: Acb0FoNHYKv0fvHJSnyRYnjNpuFx1QAAKdVw From: "Fedotov, Alexei A" To: X-OriginalArrivalTime: 20 Oct 2006 07:16:03.0657 (UTC) FILETIME=[9A497B90:01C6F417] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ilya, Sorry, my fault. I was confused by the line 41. With best regards, Alexei Fedotov, Intel Java & XML Engineering >-----Original Message----- >From: Ilya Okomin [mailto:ilya.okomin@gmail.com] >Sent: Friday, October 20, 2006 11:07 AM >To: harmony-dev@incubator.apache.org >Subject: Re: HARMONY-1752: patch review > >On 10/19/06, Fedotov, Alexei A wrote: >> >> Ilya, >> Shouldn't we change OSNetworkSystemLinux.c as well? > > >Alexei, I'm watching at the latest sources from the svn and I'm not sure we >need make changes to OSNetworkSystemLinux.c. The problem was in freeing >uninitialized fdset_read pointer. In the OSNetworkSystemWin32.c initial >value was undefined and in the OSNetworkSystemLinux.c it is set to NULL. >Thus linux native looks fine for me. > >Thanks, Ilya. > >With best regards, >> Alexei Fedotov, >> Intel Java & XML Engineering >> >-----Original Message----- >> >From: Andrew Zhang [mailto:zhanghuangzhu@gmail.com] >> >Sent: Thursday, October 19, 2006 2:05 PM >> >To: harmony-dev@incubator.apache.org >> >Subject: Re: HARMONY-1752: patch review >> > >> >On 10/19/06, Ilya Okomin wrote: >> >> >> >> On 10/19/06, Andrew Zhang wrote: >> >> >> >> > On 10/19/06, Fedotov, Alexei A wrote: >> >> > > >> >> > > Hello Ilya, >> >> > > >> >> > > >> >> > > >> >> > > I really like your patch from >> >> > > http://issues.apache.org/jira/browse/HARMONY-1752. Let me >> participate >> >> in >> >> > > a way I'm able to. >> >> > > >> >> > > >> >> > > >> >> > > I cannot say why calling free(send_buf) when send_buf =3D=3D = NULL >> makes >> >me >> >> > > feel a bit uncomfortable. >> >> > >> >> > >> >> > It's safe to free NULL pointer. >> >> > >> >> > I also prefer a descriptive name for a label >> >> > > cleanup1 (eg cleanup_buf). >> >> >> >> >> >> Alexei, you are right. I was thinking about 'cleanup_all' but for >> some >> >> inexplicable reasons forgot to rename it :) >> >> >> >> >> >> >> >> > > >> >> > > >> >> > > >> >> > > I tried to track that guy who used cleanup labels in his C code. >> >> > >> >> > >> >> > Let the author speak for himself, but I think it's ok. It's a >> >> frequentely >> >> > used error handling sytle in C programming. There's a logical >> problem >> >in >> >> > OSNetworkSystemWin32.c, the cleanup may free an invalid pointer >> >> > fdset_read. >> >> > But I perfer to add NULL initiliazation when declaring fdset_read, >> say, >> >> > fd_set * fdset_read =3D NULL; >> >> > >> >> > comments? >> >> >> >> >> >> Thanks, Andrew, IMO it is more convenient way that I've suggested. >> The >> >> problem was really that existed code was trying to free fdset_read, >> that >> >> wasn't NULL (we went to the 'cleanup' label before fdset_read >> >> initialization). >> >> I'll update patch for H-1752. >> > >> > >> >The updated patch looks fine. :) >> > >> >Regards, Ilya. >> >> >> >> >> >> >> >> > modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c: >> >> > > >> >> > > The Linux version seems to contain exactly the same problem as >> you >> >fix >> >> > > in >> modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c >> >> > > >> >> > > >> >> > > >> >> > > modules/luni/src/main/native/luni/shared/luniglob.c >> >> > > >> >> > > cleanup: >> >> > > >> >> > > if (props) { >> >> > > >> >> > > properties_free(PORTLIB, props); >> >> > > >> >> > > } >> >> > > >> >> > > if (bootDirectory) { >> >> > > >> >> > > hymem_free_memory(bootDirectory); >> >> > > >> >> > > } >> >> > > >> >> > > The first "if" always fails if we come here using goto - we can >> put >> >> the >> >> > > label after the first if. I suggest replacing the second if with >> >> > > assert(!bootDirectory) >> >> > > >> >> > > >> >> > > >> >> > > modules/archive/src/main/native/archive/shared/jarfile.c: >> >> > > >> >> > > zip_freeZipEntry is not called on some paths - is it a memory >> leak? >> >> > > >> >> > > >> >> > > >> >> > > modules/luni/src/main/native/launcher/shared/main.c >> >> > > >> >> > > if (vm_args.options) >> >> > > >> >> > > { >> >> > > >> >> > > hymem_free_memory (vm_args.options); >> >> > > >> >> > > } >> >> > > >> >> > > Should we put here assert(!vm_args.options)? >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > With best regards, >> >> > > Alexei Fedotov, >> >> > > Intel Java & XML Engineering >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > >> >> > >> >> > -- >> >> > Best regards, >> >> > Andrew Zhang >> >> > >> >> > >> >> >> >> >> >> -- >> >> -- >> >> Ilya Okomin >> >> Intel Middleware Products Division >> >> >> >> >> > >> > >> >-- >> >Best regards, >> >Andrew Zhang >> >> --------------------------------------------------------------------- >> Terms of use : http://incubator.apache.org/harmony/mailing.html >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org >> >> > > >-- >-- >Ilya Okomin >Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org