You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/03/13 01:57:46 UTC
[jira] Closed: (HARMONY-5589) [classlib][pack200] AttributeLayout
KS returning negative index
[ https://issues.apache.org/jira/browse/HARMONY-5589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall closed HARMONY-5589.
------------------------------------
This appears to have solved the problem. Thanks!
> [classlib][pack200] AttributeLayout KS returning negative index
> ---------------------------------------------------------------
>
> Key: HARMONY-5589
> URL: https://issues.apache.org/jira/browse/HARMONY-5589
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Fix For: 5.0M6
>
>
> When running Pack200 on the attached testcase, I get a:
> Thread [main] (Suspended (exception Pack200Exception("Cannot have a negative range")))
> SegmentConstantPool.getValue(int, long) line: 65
> AttributeLayout.getValue(String, long, SegmentConstantPool) line: 76
> AttributeLayout.getValue(long, String, SegmentConstantPool) line: 198
> ClassBands.parseFieldAttrBands(InputStream) line: 243
> ClassBands.parseFieldBands(InputStream) line: 152
> ClassBands.unpack(InputStream) line: 141
> Segment.parseSegment(InputStream) line: 332
> Segment.unpack(InputStream, JarOutputStream) line: 352
> Archive.unpack() line: 146
> TestUnpack.main(String[]) line: 15
> This appears to be due to the fact that value is -116 at the following point in AttributeLayout.getValue():
> } else if (layout.startsWith("K")) { //$NON-NLS-1$
> char type = layout.charAt(1);
> switch (type) {
> case 'S': // String
> --> return pool.getValue(SegmentConstantPool.CP_STRING, value);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.