Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8007902

[unpack200] incorrect BootstrapMethods attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 8
    • core-libs
    • None
    • lambda

    • b78
    • generic
    • generic
    • Verified

      The native unpacker unpack200.exe produces bad class files, and fails class comparator on lambda's
      java/util/stream/Streams.class the test jar attached reproduces the problem.

      The issue is that native packer does not correctly compute the BSM attribute length.

      This is because the data structures in the attribute have exceeded the current buffer
      while writing and the logic reallocs and rebases the buffer, therefore the cached pointer
      is invalid.

      The fix is to keep track of the offset and use that offset to compute the start pointer
      and use that to compute the length of the attribute.

            ksrini Kumar Srinivasan
            ksrini Kumar Srinivasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: