[From nobody Fri Nov 13 19:08:03 2015 Received: from userv0022.oracle.com (/156.151.31.74) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Nov 2015 21:57:21 -0800 Received: from ucsinet41.oracle.com (ucsinet41.oracle.com [156.151.31.69]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tAD5vIuE006080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 13 Nov 2015 05:57:18 GMT Received: from aojmv0009 (unknown [137.254.59.6]) by ucsinet41.oracle.com with smtp id 7c2e_128d_1c825073_5c5e_4224_a43c_a08ce5bb4dce; Fri, 13 Nov 2015 05:57:17 +0000 Received: from aojmv0009.oracle.com (localhost [127.0.0.1]) by aojmv0009 (Postfix) with ESMTP id 2FF0B1471A7; Fri, 13 Nov 2015 05:57:12 +0000 (UTC) X-Original-To: hotspot-runtime-dev@openjdk.java.net Delivered-To: hotspot-runtime-dev@openjdk.java.net Received: from ucsinet40.oracle.com (ucsinet40.oracle.com [156.151.31.68]) by aojmv0009 (Postfix) with ESMTP id 7C144147192; Fri, 13 Nov 2015 05:57:10 +0000 (UTC) Received: from userp1040.oracle.com (unknown [156.151.31.81]) by ucsinet40.oracle.com with smtp (TLS: TLSv1/SSLv3,256bits,DHE-RSA-AES256-SHA) id 7a52_1063_1c8a39c2_f023_4fc4_a9b6_1943dfc0effc; Fri, 13 Nov 2015 05:57:09 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAD5v90C007330 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Nov 2015 05:57:09 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tAD5v90p016927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 13 Nov 2015 05:57:09 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tAD5v9o9013374; Fri, 13 Nov 2015 05:57:09 GMT Received: from [192.168.1.8] (/98.234.20.133) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Nov 2015 21:57:08 -0800 Subject: Re: RFR: 8087223: InterfaceMethod CP entry pointing to a class should cause ICCE To: "hotspot-runtime-dev@openjdk.java.net" <hotspot-runtime-dev@openjdk.java.net>, hotspot-compiler-dev@openjdk.java.net References: <5644FC92.2060604@oracle.com> <56456D0F.7010300@oracle.com> From: Yumin Qi <yumin.qi@oracle.com> Organization: Oracle Corporation Message-ID: <56457C81.1030904@oracle.com> Date: Thu, 12 Nov 2015 22:00:33 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56456D0F.7010300@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: hotspot-runtime-dev@openjdk.java.net X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical discussion about the development of the HotSpot runtime subsystem <hotspot-runtime-dev.openjdk.java.net> List-Unsubscribe: <http://mail.openjdk.java.net/mailman/options/hotspot-runtime-dev>, <mailto:hotspot-runtime-dev-request@openjdk.java.net?subject=unsubscribe> List-Archive: <http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/> List-Post: <mailto:hotspot-runtime-dev@openjdk.java.net> List-Help: <mailto:hotspot-runtime-dev-request@openjdk.java.net?subject=help> List-Subscribe: <http://mail.openjdk.java.net/mailman/listinfo/hotspot-runtime-dev>, <mailto:hotspot-runtime-dev-request@openjdk.java.net?subject=subscribe> Errors-To: hotspot-runtime-dev-bounces@openjdk.java.net Sender: "hotspot-runtime-dev" <hotspot-runtime-dev-bounces@openjdk.java.net> David, Thanks for the correction, the correct link is: http://cr.openjdk.java.net/~minqi/8087223/webrev-01/ Thanks Yumin On 11/12/2015 8:54 PM, David Holmes wrote: > Hi Yumin, > > On 13/11/2015 6:54 AM, Yumin Qi wrote: >> Please review: >> >> bug: https://bugs.openjdk.java.net/browse/JDK-8087223 >> webrev: >> http://javaweb.us.oracle.com/~yqi/webrev/webrevs/8087223/8087223/webrev-01/ >> > > This is not a cr.openjdk link. > > Thanks, > David > >> According to JVMS-8: >> >> JVMS-5.4.3.3 Method Resolution: >> " If C is an interface, method resolution throws an >> IncompatibleClassChangeError." >> JVMS-5.4.3.4 Interface Method Resolution: >> "If C is not an interface, interface method resolution throws an >> IncompatibleClassChangeError" >> >> When invoke a method with resolved to an interface method, or invoke a >> interface method with resolved to an instance method, ICCE should be >> thrown. The case usually happens when using tools like asmtools or >> jdk.internal.org.objectweb.asm to generate java bytecode. >> >> The fix is carrying the constantTag for the method at call and check if >> tag is consistent with the method called. Doing this by adding a member >> of constantTag, _tag, to LinkInfo, and check tag in resolve functions >> to see if tag matched with the correct method. >> >> The fix solved the problem when call is from interpreter and compiler, >> bug for MethodHandle invoke, which should be addressed in another bug, >> since the MethodHandle does not come with a byte stream and getting the >> constant pool index at the invoke is not possible. It will be addressed >> in another bug. >> >> Tests: test case (added, minor modified from bug), JPRT, rutime quick >> test list(in progress). >> manually tested: 1) -Xint >> 2) -Xcomp >> 3) -Xcomp -XX:-TieredCompiltion >> 4) -Xcomp -XX:+TieredCompilation >> >> Thanks to Coleen for helping fixed constant pool index and cleaned >> LinkInfo. >> >> Thanks >> Yumin ]