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-5489) [pack200][classlib] java.util.ZipException("No Entries") on unpack close()
Date Wed, 13 Feb 2008 10:12:12 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568492#action_12568492

Sian January commented on HARMONY-5489:

Andrew - the ZipException was a bit of a red herring as it was hiding any earlier exceptions.
 I've checked in a fix for this in r627335 so that using Archive.unpack() shows the same behaviour
as Segment.parse().

However I'm not seeing the behaviour you describe.  I'm getting this stack trace instead for
your test case:

	at java.util.ArrayList.get(ArrayList.java:335)
	at org.apache.harmony.pack200.bytecode.LocalVariableTableAttribute.renumber(LocalVariableTableAttribute.java:139)
	at org.apache.harmony.pack200.BcBands.unpack(BcBands.java:49)
	at org.apache.harmony.pack200.Segment.parseSegment(Segment.java:325)

Do you have any local changes that could be causing you to see something different?

Also I'm slightly confused by your description because in section 5.8 of the spec it says
that members of code_handler_class_RCN can be null.  Given that fact, we should probably change
line 389 of BcBands to something like: 

CPClass cpHandlerClass = handlerClass == null ? null : new CPClass(handlerClass);

but doing this doesn't actually efffect the error I'm seeing...  Can you throw any light on

> [pack200][classlib] java.util.ZipException("No Entries") on unpack close()
> --------------------------------------------------------------------------
>                 Key: HARMONY-5489
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5489
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: All Pack200
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>         Attachments: mypack.pack
> The ClassBands.getCodeHandlerClassRCN() method answers an array of arrays of Strings
(which is stored as handlerClassTypes in BcBands.unpack). That structure sometimes contains
what appear to be inappropriate nulls, which leads to the following code failing:
> (from BcBands.unpack()):
>                     if(handlerCount != null) {
>                         for (int j = 0; j < handlerCount[i]; j++) {
>                             String handlerClass = handlerClassTypes[i][j];
>                             CPClass cpHandlerClass = new CPClass(handlerClass);
>                             ExceptionTableEntry entry = new ExceptionTableEntry(
>                                     handlerStartPCs[i][j], handlerEndPCs[i][j],
>                                     handlerCatchPCs[i][j], cpHandlerClass);
>                             exceptionTable.add(entry);
>                         }
> handlerClassTypes[i][j] can be null, which means that handlerClass is null. The code
then fails when trying to create a new CPClass(null).

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

View raw message