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 2006/06/27 16:44:41 UTC
DO NOT REPLY [Bug 39911] New: - BCEL 5.2 - MethodGen does not initialize max_stack and max_locals properly
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=39911>.
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=39911
Summary: BCEL 5.2 - MethodGen does not initialize max_stack and
max_locals properly
Product: BCEL
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Main
AssignedTo: bcel-dev@jakarta.apache.org
ReportedBy: alkinneer@hotmail.com
The constructor for MethodGen:
public MethodGen(Method, String, ConstantPoolGen)
does not properly initialize the max_stack and max_local variables from the
Method object. Thus the following sequence of actions will produce a
non-verifying class, even though it clearly shouldn't:
ClassGen cg = new ClassGen(javaClass);
Method m = cg.getMethodAt(0);
MethodGen mg = new MethodGen(m, cg.getClassName(), cg.getConstantPool());
cg.setMethodAt(mg.getMethod(), 0);
cg.getJavaClass().dump(...);
Bug can be fixed by adding the following the constructor:
Code c = m.getCode();
max_stack = c.getMaxStack();
max_locals = c.getMaxLocals();
--
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
DO NOT REPLY [Bug 39911] - BCEL 5.2 - MethodGen does not initialize max_stack and max_locals properly
Posted by bu...@apache.org.
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=39911>.
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=39911
alkinneer@hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From alkinneer@hotmail.com 2006-08-15 15:07 -------
Whoops, code confusion with a subclass.
*Puts on dunce hat and sits in corner for 15 minutes*
--
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