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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2, 6.0
    • 6.0
    • Verifier
    • 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.patch
          6 kB
          Jérôme Leroux
        2. BCEL-184.zip
          0.5 kB
          Jérôme Leroux

        Activity

          People

            Unassigned Unassigned
            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