RFR (S) 8031059: invokestatic: ICCE trying to invoke static method when it clashes with an abstract method inherited from an interface

harold seigel harold.seigel at oracle.com
Thu Jan 9 13:41:24 PST 2014


Hi Keith,

I think that the resolution is finding overpass method m(), instead of 
static method m(), because of the implementation of function 
merge_in_new_methods() in defaultMethods.cpp.  If a new method and an 
original method have the same name then the new method gets placed in 
the klass's method array before the original method.  This causes 
resolution to find the new method ahead of the original method.

In this case, the new method is the overpass m().  The original method 
is static m().

Do you think the implementation of merge_in_new_methods() should be changed?

Thanks, Harold


On 1/9/2014 3:03 PM, Keith McGuigan wrote:
> Hi Harold,
>
> Thanks for opening the bug.  The code looks ok, but I wonder if this 
> is the right place for the fix.  Generating a non-static 
> exception-throwing method shouldn't matter so long as the resolution 
> finds the right static method when doing the resolution for 
> invokestatic.  Why is that resolution finding the overpass method 
> instead of the static method?
>
>
> On Tue, Jan 7, 2014 at 5:37 PM, Coleen Phillimore 
> <coleen.phillimore at oracle.com <mailto:coleen.phillimore at oracle.com>> 
> wrote:
>
>
>     This looks good.
>     Coleen
>
>     On 01/07/2014 04:13 PM, harold seigel wrote:
>
>         Hi,
>
>         Please review this fix for bug 8031059.  The problem is caused
>         by the generation of overpass exception methods (during
>         default method processing) that prevents subsequent method
>         resolution from finding existing static methods.  This change
>         fixes the problem by not generating an overpass exception
>         method if the current class has a static method with the same
>         name and signature as the targeted default method.
>
>         The fix has been tested with the default methods tests, JCK
>         lang and VM tests, and JTREG java/lang, java/util, and hotspot
>         tests, and the test programs attached to bugs 8031059 and 8031034.
>
>         Open webrev at:
>         http://cr.openjdk.java.net/~hseigel/bug_8031059/
>         <http://cr.openjdk.java.net/%7Ehseigel/bug_8031059/>
>         <http://cr.openjdk.java.net/%7Ehseigel/bug_8031059/>
>
>         Bug: https://bugs.openjdk.java.net/browse/JDK-8031059
>
>         Thanks! Harold
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20140109/53fa272e/attachment.html 


More information about the hotspot-runtime-dev mailing list