[
https://issues.apache.org/jira/browse/BCEL-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Bourg updated BCEL-134:
--------------------------------
Priority: Blocker
Environment: (was: Operating System: All
Platform: All)
Fix Version/s: 6.0
Priority: (was: P2)
Severity: (was: normal)
> ExecutionVisitor doesn't support Class constant type for LDC and LDC_W
> ----------------------------------------------------------------------
>
> Key: BCEL-134
> URL: https://issues.apache.org/jira/browse/BCEL-134
> Project: Commons BCEL
> Issue Type: Bug
> Components: Main
> Affects Versions: 5.2
> Reporter: Enrico Gueli
> Assignee: Apache Commons Developers
> Priority: Blocker
> Fix For: 6.0
>
> Attachments: ExecutionVisitor-2.diff, ExecutionVisitor.diff
>
>
> Methods visitLDC() and visitLDC_W() push no values in the stack frame when the
> constant type is a class literal, as can happen with Java 1.5 bytecode. This
> leads to a false stack underflow exception happening to a subsequent
> instruction:
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.remove(ArrayList.java:390)
> at
> org.apache.bcel.verifier.structurals.OperandStack.pop(OperandStack.java:135)
> at
> org.apache.bcel.verifier.structurals.ExecutionVisitor.visitPUTFIELD(ExecutionVisitor.java:1059)
> at org.apache.bcel.generic.PUTFIELD.accept(PUTFIELD.java:78)
> Moreover, it would be desired to throw an exception when an unknown constant
> type is encountered, rather than doing nothing at all.
> This bug arises while running JiST/SWANS, a network simulator that relies on
> rewriting Java bytecode to implement simulation time. To be more specific, it
> arises when running the example UDP test application, launching
> jist.runtime.Main with arguments "jist.swans.Main driver.udp".
> I've attached a possible patch against its HEAD revision (411573).
> Enrico
--
This message was sent by Atlassian JIRA
(v6.2#6252)