[jboss-jira] [JBoss JIRA] (JASSIST-207) Inconsistent Stack Map when inserting throw Expression with Java 7
Shigeru Chiba (JIRA)
issues at jboss.org
Wed Jul 23 06:37:30 EDT 2014
[ https://issues.jboss.org/browse/JASSIST-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shigeru Chiba closed JASSIST-207.
---------------------------------
> Inconsistent Stack Map when inserting throw Expression with Java 7
> ------------------------------------------------------------------
>
> Key: JASSIST-207
> URL: https://issues.jboss.org/browse/JASSIST-207
> Project: Javassist
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.18.0-GA
> Reporter: Ben Romberg
> Assignee: Shigeru Chiba
> Priority: Critical
> Fix For: 3.18.1-GA, 3.19.0-GA
>
> Attachments: afterInsertThrowExpression.txt, AGDelegateImpl.class, beforeInsertThrowExpression.txt, conditionalThrowExceptionInserted.txt
>
>
> I wrote a unit-test for javassist, reproducing the issue:
> {code}
> public class ThrowExpressionCorruptsStackMapTableTest extends JvstTestRoot {
> public ThrowExpressionCorruptsStackMapTableTest(String name) {
> super(name);
> }
> public void testInsertLocalVars() throws Exception {
> CtClass cc = sloader.get("test4.LocalVars");
> CtMethod m1 = cc.getDeclaredMethod("run");
> m1.insertBefore("throw new AssertionError((Object) \"assertion error\");");
> cc.writeFile();
> Object obj = make(cc.getName());
> assertEquals(10, invoke(obj, "run"));
> }
> }
> {code}
> Throws:
> java.lang.VerifyError: Expecting a stack map frame in method test4.LocalVars.run()I at offset 45
> My use-case is almost the same, inserting a "throw AssertionError(...)" expression with insertBefore. However, I get a slightly different error message:
> Stack map does not match the one at exception handler 37 in method timeofday.TimeOfDay.getSecond()I at offset 27
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list