RFR (S) : JDK-8007736 - VerifyError for use of static method in interface

David Holmes david.holmes at oracle.com
Mon Feb 11 16:31:12 PST 2013


On 12/02/2013 1:21 AM, S. Bharadwaj Yadavalli wrote:
> Remi, David,
>
> Thanks for reviewing the changes.
>
> I was attempting to be (globally?) consistent with the way major version
> check is done in classFileParser.cpp.
>
> I think the start (or end) of support for a feature corresponds to a
> specific Java version, doesn't it? It appears to me that it is more
> meaningful to verify based on version rather than feature name.
 >
> I do see that verifier.cpp uses NO_FAILOVER_MAJOR and not JAVA_7_VERSION
> and the suggestion you make is locally consistent. I would say
> NO_FAILOVER_MAJOR should be renamed JAVA_7_VERSION.

I think verifier.cpp has it right in its existing use of 
NO_FAILOVER_MAJOR. I think the changes to classFileParses.cpp to 
correlate new features with specific Java versions are the ones that 
should be changed if going for global consistency. But local consistency 
is fine here. Besides I don't want to see JAVA_8_VERSION being defined 
in two different files!

Cheers,
David

> Comments?
>
> Thanks,
>
> Bharadwaj
> On 2/9/2013 5:56 PM, David Holmes wrote:
>> On 9/02/2013 9:27 PM, Remi Forax wrote:
>>> On 02/09/2013 02:56 AM, Krystal Mo wrote:
>>>> Hi Bharadwaj,
>>>>
>>>> Looks good to me.
>>>>
>>>> - Kris
>>>
>>> I'm not a reviewer but JAVA_8_VERSION should be named
>>> STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION
>>> i.e. the name should correspond to a feature and not a peculiar version
>>> of Java (like NO_FAILOVER_MAJOR_VERSION).
>>
>> I was about to write exactly the same thing.
>>
>> David
>>
>>> cheers,
>>> Rémi
>>>
>>>>
>>>> On 02/08/2013 04:57 PM, S. Bharadwaj Yadavalli wrote:
>>>>>
>>>>> I would like to request for code reviews for the following changes.
>>>>>
>>>>> Code changes : http://cr.openjdk.java.net/~bharadwaj/8007736/webrev/
>>>>> Bug fixed    : https://jbs.oracle.com/bugs/browse/JDK-8007736
>>>>>
>>>>> Summary of changes :
>>>>>      Java 8 allows public static interface methods. To accommodate
>>>>> for this, the proposed change modifies bytecode verification of Java
>>>>> 8 classfiles to allow invokestatic to refer to static interface
>>>>> methods in CONSTANT_InterfaceMethodref as well as static class
>>>>> methods in CONSTANT_Methodref.
>>>>>
>>>>> New test added :
>>>>>      A new jtreg test in hotspot/test/runtime is added.
>>>>>
>>>>> Testing done:
>>>>>      No new jtreg failures seen due to this change.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Bharadwaj
>>>>
>>>
>


More information about the hotspot-runtime-dev mailing list