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
}
whereas the LineNumberTable should be:
attribute LineNumberTable {
attribute_name_index = #9 // "LineNumberTable"
attribute_length = 18
line_number_table_length = 4
line_number_table
If I had to guess, I'd bet the initial value is computed incorrectly, and subsequent deltas inherit the error.