commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BCEL-187) Verification error when an invoke references a method defined in superclass
Date Tue, 06 Jan 2015 12:00:41 GMT

     [ https://issues.apache.org/jira/browse/BCEL-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Bourg updated BCEL-187:
--------------------------------
    Affects Version/s:     (was: 6.x)
        Fix Version/s: 6.0

> Verification error when an invoke references a method defined in superclass
> ---------------------------------------------------------------------------
>
>                 Key: BCEL-187
>                 URL: https://issues.apache.org/jira/browse/BCEL-187
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Verifier
>    Affects Versions: 5.2
>            Reporter: Jérôme Leroux
>             Fix For: 6.0
>
>         Attachments: BCEL-187.patch, BCEL-187.zip
>
>
> Assuming a class A with a method foo() and a class B subclass of A. If an invoke opcode
references the method B.foo() then the bytecode verifier raises an error with the following
error message:
> {quote}
> Referenced method 'foo' with expected signature '()void' not found in class 'B'. The
native verifier does allow the method to be declared in some superinterface, which the Java
Virtual Machine Specification, Second Edition does not.
> {quote}
> I can't find where in the _Java Virtual Machine Specification, Second Edition_ this restriction
is defined.
> The verification of the bytecode generated by the following code fails:
> {code:java}
> public class TestLegalInvokeInterface01{
>     public static void test1(Interface01 t){
>         t.run();
>     }
> }
> interface Interface01 extends Runnable {
>     
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message