RFR (S) : 8004967 - Default method cause java.lang.VerifyError: Illegal use of nonvirtual function call

Bharadwaj Yadavalli bharadwaj.yadavalli at oracle.com
Wed Jan 2 07:54:07 PST 2013


Updated the webrev at 
http://cr.openjdk.java.net/~bharadwaj/8004967/hotspot/webrev/.

Please review the changes.

I re-ran JCK tests and runThese. No new failures.

Thanks,

Bharadwaj

On 12/27/2012 12:49 PM, Vladimir Kozlov wrote:
> Bharadwaj,
>
> I would check for < jdk8 instead of !>=, it is more clear :
>
> +       if (! (_major_version >= JAVA_8_VERSION)) {
>
> Next should be one line "} else {":
>
> +     }
> +     else {
>
> I would move the legality table comment inside "if (is_interface)". 
> Why is_public and is_abstract in your table are illegal before jdk5? 
> The conditions check the opposite.
>
> Should you also check for (is_protected) for versions before jdk8? It 
> may be not defined for those versions but for condition completeness 
> we should check. Also I don't see checks for is_bridge, is_varargs, 
> is_synthetic. And what about pre jdk5? I would split >=jdk5 and pre 
> versions to follow the table:
>
> if (major_gte_8) {
>   ...
> } else if (major_gte_15) {
>   ...
> } else {
>   ...
> }
>
> Thanks,
> Vladimir
>
> On 12/24/12 7:44 AM, Bharadwaj Yadavalli wrote:
>> I updated legality verification of default methods of a Java 8
>> interfaces. This update
>> fixes JDK-8004967 and three other failures in Lambda's test-ng tests.
>>
>> I also cleaned up the legality verification of interface methods of
>> pre-Java 8 interface
>> methods. I refactored the code by separating the checks depending on the
>> version
>> being pre-Java 8 or Java 8 and later.
>>
>> Please review the changes at
>> http://cr.openjdk.java.net/~bharadwaj/8004967/hotspot/webrev/
>>
>> Ran api, lang and vm JCK tests; no new failures.
>>
>> Thanks,
>>
>> Bharadwaj
>>


More information about the hotspot-runtime-dev mailing list