|
Loading...
|
bcel-dev@jakarta.apache.org
[Prev] Thread [Next] | [Prev] Date [Next]
DO NOT REPLY [Bug 47902] New: ExecutionVisitor doesn't support Class constant type for LDC and LDC_W bugzilla Fri Sep 25 03:02:09 2009
https://issues.apache.org/bugzilla/show_bug.cgi?id=47902
Summary: ExecutionVisitor doesn't support Class constant type
for LDC and LDC_W
Product: BCEL
Version: 5.2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Main
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=24309)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24309)
ExecutionVisitor patch
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
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- DO NOT REPLY [Bug 47902] New: ExecutionVisitor doesn't support Class constant type for LDC and LDC_W bugzilla 2009/09/25 <=
- DO NOT REPLY [Bug 47902] ExecutionVisitor doesn't support Class constant type for LDC and LDC_W bugzilla 2009/09/25
- DO NOT REPLY [Bug 47902] ExecutionVisitor doesn't support Class constant type for LDC and LDC_W bugzilla 2009/09/25
- DO NOT REPLY [Bug 47902] ExecutionVisitor doesn't support Class constant type for LDC and LDC_W bugzilla 2009/09/25