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/10 21:36:49 UTC

[jira] Updated: (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 updated HARMONY-5589:
-------------------------------------

    Attachment: com.ibm.collaboration.realtime.alertmanager_7.5.1.20070416.jar
                com.ibm.collaboration.realtime.alertmanager_7.5.1.20070416.pack.gz

.pack.gz is file packed with Sun pack200. .jar is original file.

> [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
>         Attachments: com.ibm.collaboration.realtime.alertmanager_7.5.1.20070416.jar, com.ibm.collaboration.realtime.alertmanager_7.5.1.20070416.pack.gz
>
>
> 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.