Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 32030 invoked from network); 19 Oct 2006 16:29:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2006 16:29:36 -0000 Received: (qmail 86938 invoked by uid 500); 19 Oct 2006 16:29:32 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 86858 invoked by uid 500); 19 Oct 2006 16:29:31 -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 86847 invoked by uid 99); 19 Oct 2006 16:29:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2006 09:29:31 -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 [143.182.124.21] (HELO mga03.intel.com) (143.182.124.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2006 09:29:28 -0700 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by mga03.intel.com with ESMTP; 19 Oct 2006 09:29:06 -0700 Received: from fmsmsx332.fm.intel.com (HELO fmsmsx332.amr.corp.intel.com) ([132.233.42.148]) by azsmga001.ch.intel.com with ESMTP; 19 Oct 2006 09:29:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,330,1157353200"; d="scan'208"; a="133284924:sNHT57480080" Received: from fmsmsx311.amr.corp.intel.com ([132.233.42.214]) by fmsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 19 Oct 2006 09:28:27 -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); Thu, 19 Oct 2006 09:28:27 -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: Thu, 19 Oct 2006 20:28:23 +0400 Message-ID: <8E389A5F2FEABA4CB1DEC35A25CB39CE5E4767@mssmsx411> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: HARMONY-1752: patch review thread-index: AcbzZiGjDXW0lU6wRCGZyHlJvuFjuwANWGtQ From: "Fedotov, Alexei A" To: X-OriginalArrivalTime: 19 Oct 2006 16:28:27.0870 (UTC) FILETIME=[9B5D47E0:01C6F39B] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ilya, Shouldn't we change OSNetworkSystemLinux.c as well? 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