[jboss-jira] [JBoss JIRA] (JASSIST-234) Support for Javaflow bytecode pattern

Shigeru Chiba (JIRA) issues at jboss.org
Sat Sep 27 10:08:02 EDT 2014


Shigeru Chiba created JASSIST-234:
-------------------------------------

             Summary: Support for Javaflow bytecode pattern
                 Key: JASSIST-234
                 URL: https://issues.jboss.org/browse/JASSIST-234
             Project: Javassist
          Issue Type: Patch
    Affects Versions: 3.18.2-GA
            Reporter: Shigeru Chiba
            Assignee: Shigeru Chiba


The Apache Javaflow project instruments class files to provide its Continuation capability. One of the bytecode patterns it generates to handle Category 2 parameters is:

NEW
DUP
DUP2_X2
POP2

Unfortunately, when Javassist sees this pattern when moving instructions, it recognizes the NEW DUP and removes it in order to do the move. However, this leaves the DUP2_X2 POP2 abandoned which leads to stack corruption and javassist throwing an exception due to a negative stack height.

Given this involves Category 2 operands, there is not much short of a complete rearchitecting that can be done in Javaflow to accommodate the existing Javassist patterns for NEW. Therefore, I ask the the above bytecode pattern be added to the javassist.expr.NewExpr.canReplace() method. I will submit a patch with the proposed change.

Originally reported by Baron Roberts at:
https://github.com/jboss-javassist/javassist/pull/21



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list