harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cornwall (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5589) [classlib][pack200] AttributeLayout KS returning negative index
Date Mon, 10 Mar 2008 20:34:46 GMT
[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


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.


Mime
View raw message