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/02/12 01:53:08 UTC
[jira] Created: (HARMONY-5489) [pack200][classlib]
ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
[pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
---------------------------------------------------------------------------------
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
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.
[jira] Assigned: (HARMONY-5489) [pack200][classlib]
ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January reassigned HARMONY-5489:
-------------------------------------
Assignee: Sian January
> [pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
> ---------------------------------------------------------------------------------
>
> 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.
[jira] Commented: (HARMONY-5489) [pack200][classlib]
java.util.ZipException("No Entries") on unpack close()
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ 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:
java.lang.IndexOutOfBoundsException
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 this?
> [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.
[jira] Commented: (HARMONY-5489) [pack200][classlib]
ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567909#action_12567909 ]
Andrew Cornwall commented on HARMONY-5489:
------------------------------------------
This issue may be due in part to my using the test Unpack method (which uses Segment instead of Archive). When I use new Archive(in, out) and unpack(), I see a different exception which may be unrelated.
> [pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
> ---------------------------------------------------------------------------------
>
> 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
> 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.
[jira] Commented: (HARMONY-5489) [pack200][classlib]
java.util.ZipException("No Entries") on unpack close()
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568183#action_12568183 ]
Andrew Cornwall commented on HARMONY-5489:
------------------------------------------
(I've updated the title to reflect this).
> [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.
[jira] Updated: (HARMONY-5489) [pack200][classlib]
ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall updated HARMONY-5489:
-------------------------------------
Attachment: mypack.pack
Pack200 file which triggers this error in my workspace.
> [pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?
> ---------------------------------------------------------------------------------
>
> 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
> 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.
[jira] Updated: (HARMONY-5489) [pack200][classlib]
java.util.ZipException("No Entries") on unpack close()
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall updated HARMONY-5489:
-------------------------------------
Summary: [pack200][classlib] java.util.ZipException("No Entries") on unpack close() (was: [pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?)
Using Archive.unpack(), the same test case throws:
Thread [main] (Suspended (exception ZipException))
JarOutputStream(ZipOutputStream).finish() line: 159
JarOutputStream(ZipOutputStream).close() line: 59
Archive.unpack() line: 153
TestUnpack.main(String[]) line: 15
> [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.
[jira] Closed: (HARMONY-5489) [pack200][classlib]
java.util.ZipException("No Entries") on unpack close()
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall closed HARMONY-5489.
------------------------------------
Resolution: Invalid
Closing this issue because it's no longer the same issue. After getting your latest Archive and Segment, I see the same error you see. I'll open a different bug for that.
> [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.