You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2005/02/14 03:00:03 UTC
DO NOT REPLY [Bug 33549] New: -
LocalVariableTypeTable seems not to be updated like LocalVariableTable
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33549>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33549
Summary: LocalVariableTypeTable seems not to be updated like
LocalVariableTable
Product: BCEL
Version: 5.1
Platform: PC
OS/Version: Windows 2000
Status: NEW
Keywords: JDK1.5
Severity: major
Priority: P2
Component: Main
AssignedTo: bcel-dev@jakarta.apache.org
ReportedBy: marco.petris@web.de
Scenario:
I insert into a method which has a parameterized argument some instructions and
two local variables.
The methods signature looks like this:
public void doSomething( double d, ArrayList<Integer> list )
The method is situated in the class MyClassFile.
Result:
Loading the class MyClassFile which contains the new method 'doSomething'
results in a ClassFormatError:
LVTT entry for 'list' in class file MyClassFile does not match any LVT entry
This error is not produced if the method declaration is done without generics:
public void doSomething( double d, ArrayList list )
The difference is the LocalVariableTypeTable. It is not present if I do not use
generics.
Due to the insertion of the new instructions the start_pc and the length of the
local variable have to be updated in the LocalVariableTable, which is done.
But the corresponding entry in the LocalVariableTypeTable gets not updated its
start_pc and length entries.
LocalVariableTable ( BEFORE INSERTION ):
start_pc, length, index, name
0, 26, 0, this
0, 26, 1, d
0, 26, 3, list
LocalVariableTypeTable( BEFORE INSERTION ):
0, 26, 3, list
LocalVariableTable ( AFTER INSERTION ):
start_pc, length, index, name
44, 33, 0, this
44, 33, 1, d
44, 33, 3, list
1, 85, 4, wrapper_argumentlist
26, 60, 5, wrapper
LocalVariableTypeTable( AFTER INSERTION ):
0, 26, 3, list
The class works fine before the insertion.
I've done bcel CVS checkout, but it did not help.
The original instructions of the methods are not modified.
I simply install a wrapper around the original body.
I add an exception handler, therefore there is also an additional entry in
the exceptiontable.
I can toggle the error behaviour by using or not using the generic argument.
generic -> error
no generic -> no error
I tried JDK 5.0 build 1.5.0-b64 and eclipse 3.1.0 build 200412162000 as a compiler.
I use the JVR of the above mentioned JDK.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org