You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2015/03/08 09:36:38 UTC

[jira] [Commented] (BCEL-189) Wrong field resolution in the verifier may lead to verification error

    [ https://issues.apache.org/jira/browse/BCEL-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351971#comment-14351971 ] 

Emmanuel Bourg commented on BCEL-189:
-------------------------------------

Is it necessary to keep the Resolver class public? Are alternative implementations likely to be written?

> Wrong field resolution in the verifier may lead to verification error
> ---------------------------------------------------------------------
>
>                 Key: BCEL-189
>                 URL: https://issues.apache.org/jira/browse/BCEL-189
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Verifier
>    Affects Versions: 6.0
>            Reporter: Jérôme Leroux
>         Attachments: BCEL-189-2.patch, BCEL-189-2.zip, BCEL-189.patch, BCEL-189.zip
>
>
> The field reference resolution is not implemented correctly in the verifier. This may lead to an unresolved field reference that fails the verification of a correct classfile.
> Here is a Java example that fails:
> {code:java}
> public class B extends A{
>     public void test(){
>         int i = this.field;
>     }
> }
> class A {
>     int field;
> }
> {code}
> See chapter _5.4.3.2 Field Resolution_ of the _The Java Virtual Machine Specification Second Edition_ for more information (http://docs.oracle.com/javase/specs/jvms/se5.0/html/ConstantPool.doc.html#71685)



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