Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 32094 invoked from network); 2 Apr 2007 03:04:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2007 03:04:51 -0000 Received: (qmail 86322 invoked by uid 500); 2 Apr 2007 03:04:52 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 86293 invoked by uid 500); 2 Apr 2007 03:04:52 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 86284 invoked by uid 99); 2 Apr 2007 03:04:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2007 20:04:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mloenko@gmail.com designates 209.85.132.247 as permitted sender) Received: from [209.85.132.247] (HELO an-out-0708.google.com) (209.85.132.247) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2007 20:04:43 -0700 Received: by an-out-0708.google.com with SMTP id b2so1133221ana for ; Sun, 01 Apr 2007 20:04:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MaZhRfHtxhi/Bs5ntjdHJtBUTS9tkrCCd9FIwPKs4E0Q5/yIY0MwksN9C46ofyFs2SVwk7VPtfpp9pH9WjnukFRR12PopHdfgzUEQ+9ajzPwez4a4IpIhM/ICxNWsrSUoBPOYQOcGpw/wnmvD+azL8ET6RABdN6E6Vxold7sntg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SBHPgfKMtRhRW+zhGmROmL87Llq6QGXMauZI0bVcEbvWqJgUbP84vKG0GTU/hr0leXMx5PTavMW914zbqTEFI7BHn4WRM0yGywb8jc9uVK/eyQC+ic2wHxmqq9BbHpp3nVyONlb4tVvJ8HoLv+7IzsSOHNPoy5kOnlrFYjOuOgw= Received: by 10.100.8.18 with SMTP id 18mr3183396anh.1175483062559; Sun, 01 Apr 2007 20:04:22 -0700 (PDT) Received: by 10.100.33.18 with HTTP; Sun, 1 Apr 2007 20:04:22 -0700 (PDT) Message-ID: <906dd82e0704012004t3c828cc7xb667a3259e78c099@mail.gmail.com> Date: Mon, 2 Apr 2007 10:04:22 +0700 From: "Mikhail Loenko" To: dev@harmony.apache.org Subject: Re: verification of unreachable code In-Reply-To: <0vqk5wvg3l8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <0vqk5wvg3l8.fsf@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 02 Apr 2007 01:57:39 +0400, Egor Pasko : > On the 0x2AB day of Apache Harmony Alexei Fedotov wrote: > > Hello, Pavel, community, > > > > Could you here help me to understand the following issue? Consider the > > following example: > > ; > > ; test method > > .method public test([Ljava/lang/String;)I > > .limit stack 3 > > .limit locals 2 > > > > > > sipush 555 > > iconst_1 ; push int 1 > > iconst_2 ; push int 2 > > if_icmplt Next > > Next: > > sipush 555 > > if_icmpne Fail > > ; pass > > sipush 104 > > ireturn > > > > Fail: > > sipush 105 > > ireturn // <<<<<< look here > > > > > > return // <<<<<< look here > > .end method > > > > In VM validation test suite we have a big number of tests like this > > which have several different return instructions one method. JVM spec > > says about this: "Each return instruction must match its method's > > return type." Strangely, Sun's verifier allows this code to pass > > verification, probably due to the fact that invalid "return" statement > > is unreachable. > > > > Do you think we should be compatible with Sun on this issue? > > I think, skipping analysis of unreachable code pieces would make > verification easier and faster not sacrificing JVM security, real apps > and such. JIT does not touch unreachable code too. So, let's decide if > real TCK/compat issues appear and forget unreachable code until then. +1 Thanks, Mikhail > > -- > Egor Pasko > >