Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-184

JustIce verifier does not check correctly the returned value of a method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2, 6.0
    • Fix Version/s: 6.0
    • Component/s: Verifier
    • Labels:
      None

      Description

      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:

             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)
      

        Attachments

        1. BCEL-184.zip
          0.5 kB
          Jérôme Leroux
        2. BCEL-184.patch
          6 kB
          Jérôme Leroux

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jejecool Jérôme Leroux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified