Jérôme Leroux created BCEL-184:
----------------------------------

             Summary: 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


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)

Reply via email to