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

Code attribute size not updated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 6.8.1
    • 6.0
    • Main
    • None

    Description

      The code attribute length when dumped is not updated, and as such will write the old size of the attribute should the size of the actual byte code change.

      A possible fix is adding:
      "setLength(calculateLength());"

      to the first line of:
      org.apache.bcel.classfile.Code.dump(DataOutputStream) throws IOException

      When trying to execute code that has this error, it throws a ClassFormatException, Wrong code segment length (Should there be no other formatting errors with the code).

      Attachments

        Activity

          People

            issues@commons.apache.org Apache Commons Developers
            glenchat@gmail.com Glen Chatfield
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: