[jboss-jira] [JBoss JIRA] (JASSIST-213) jvmvrfy012 stack shape inconsistent
Diego Correnti (JIRA)
jira-events at lists.jboss.org
Wed Nov 20 04:45:07 EST 2013
Diego Correnti created JASSIST-213:
--------------------------------------
Summary: jvmvrfy012 stack shape inconsistent
Key: JASSIST-213
URL: https://issues.jboss.org/browse/JASSIST-213
Project: Javassist
Issue Type: Bug
Affects Versions: 3.16.1-GA
Reporter: Diego Correnti
Assignee: Shigeru Chiba
Priority: Critical
I get jvmvrfy012 stack shape inconsistent from this code:
String method ="public Object evaluate(Object owner){return owner.toString().length() <= 10;}";
ClassPool pool = ClassPool.getDefault();
pool.insertClassPath(new ClassClassPath(CodeInjector.class));
CtClass newClass = pool.makeClass("MyExpression");
newClass.setInterfaces(new CtClass[] {pool.get("magnum.commands.IExpression")});
CtMethod newmethod = CtNewMethod.make(method,newClass);
newClass.addMethod(newmethod);
Class<?> cClass = newClass.toClass();
Object snippet = cClass.newInstance();
public interface IExpression<TypeIn,TypeOut>
{
TypeOut evaluate(TypeIn owner);
}
Caused by: java.lang.VerifyError: JVMVRFY012 forma stack non coerente; classe=MyExpression, metodo=evaluate(Ljava/lang/Object;)Ljava/lang/Object;, pc=17
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1325)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list