harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sian January (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5507) [pack200][classlib] LocalVariableTableAttribute localVariableTableSpanO can be negative
Date Thu, 14 Feb 2008 11:25:12 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568884#action_12568884
] 

Sian January commented on HARMONY-5507:
---------------------------------------

I've done some debugging and found the rogue -1107 value like you did.  The strange thing
is that the rest of the band seems to be fine, which is not something I've seen before.  Andrew
- is there any way of finding out what the value should be?  E.g. can we look at the local
variable tables of the code before it was packed?  If so, the method in question is:

org/apache/harmony/pack200/bytecode/forms/ByteCodeForm
<clinit>:()V

> [pack200][classlib] LocalVariableTableAttribute localVariableTableSpanO can be negative
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5507
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5507
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: All Pack200
>            Reporter: Andrew Cornwall
>         Attachments: mypack.pack
>
>
> Unpacking the attached mypack.pack test case, I get an exception:
> Thread [main] (Suspended (exception ArrayIndexOutOfBoundsException))	
> 	ArrayList<E>.get(int) line: 324	
> 	LocalVariableTableAttribute.renumber(List) line: 139	
> 	BcBands.unpack(InputStream) line: 407	
> 	Segment.parseSegment(InputStream) line: 325	
> 	Segment.parse(InputStream) line: 92	
> 	Unpack.main(String[]) line: 36	
> This appears to be happening because LocalVariableTableAttribute.lengths[0] == -1107.
This is a value passed into LocalVariableTableAttribute(int, int[], int[], CPUTF8[], CPUTF8[],
int[]) by ClassBands.parseCodeAttrBands(InputStream, int) .
> I think the decode of this value computed by:
>         int[][] localVariableTableSpanO = decodeBandInt(
>                 "code_LocalVariableTable_span_O", in, Codec.BRANCH5,
>                 localVariableTableN);
>  is not quite right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message