Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5570

[classlib][pack200] LineNumberTableAttribute being computed incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0M6
    • Classlib
    • None
    • Latest Pack200

    Description

      In the latest Pack200 code, the LineNumberTable attribute is being calculated incorrectly. It appears to be right for a single class at a time, but when multiple classes are being unpacked the line_number values go strange.

      To reproduce, unpack the attached mypack.pack and look at the LineNumberTable attribute for CPString.<init>. The LineNumberTable in the Harmony version is:
      attribute LineNumberTable {
      attribute_name_index = #88 // "LineNumberTable"
      attribute_length = 18
      line_number_table_length = 4
      line_number_table

      { // start_pc line_number 0 2323 7 2324 14 2325 35 2327 }

      }

      whereas the LineNumberTable should be:

      attribute LineNumberTable {
      attribute_name_index = #9 // "LineNumberTable"
      attribute_length = 18
      line_number_table_length = 4
      line_number_table

      { // start_pc line_number 0 27 7 28 14 29 35 31 }

      If I had to guess, I'd bet the initial value is computed incorrectly, and subsequent deltas inherit the error.

      Attachments

        1. mypack.jar
          378 kB
          Andrew Cornwall
        2. mypack.pack
          671 kB
          Andrew Cornwall

        Activity

          People

            sjanuary Sian January
            andrewc Andrew Cornwall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: