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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]