commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BCEL-184) JustIce verifier does not check correctly the returned value of a method
Date Wed, 11 Mar 2015 03:08:38 GMT

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

Sebb commented on BCEL-184:
---------------------------

Another way to generate the invalid class files might be to read/write the class file using
Java.
Just a thought.

> JustIce verifier does not check correctly the returned value of a method
> ------------------------------------------------------------------------
>
>                 Key: BCEL-184
>                 URL: https://issues.apache.org/jira/browse/BCEL-184
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Verifier
>    Affects Versions: 5.2, 6.0
>            Reporter: Jérôme Leroux
>             Fix For: 6.0
>
>         Attachments: BCEL-184.patch, BCEL-184.zip
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Defining a {{areturn}} opcode (return object) in a void method is accepted by the bytecode
verifier.
> This must not be allowed.
> Here is an example of a non-valid bytecode for a void method:
> {code}
>        BB 0003      // 0   : new java/lang/Object
>        59           // 3   : dup 
>        B7 0008      // 4   : invokespecial java/lang/Object.<init>()V
>        00           // 7   : nop 
>        B0           // 8   : areturn (Not allowed in a void method)
> {code}



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

Mime
View raw message