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

ARRAYLENGTH incorrectly not StackConsumer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.8.1
    • 6.0
    • Main

    Description

      According to the JVM Instruction Set, ARRAYLENGTH pops a value from the stack
      and pushes a value to the stack. In BCEL, it only implements StackProducer, so
      it creates an incorrectly high stack height. The Constants class already has the
      correct value for it, but since the instruction does not implement StackConsumer
      it is never used. The easiest solution is to change
      src\java\src\java\org\apache\bcel\generic\ARRAYLENGTH.java to implement
      StackConsumer. This will fix the bug.

      I didn't attach a patch for this because the change is so tiny.

      Attachments

        Activity

          People

            issues@commons.apache.org Apache Commons Developers
            zappacky@gmail.com Zappacky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: