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

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


     [ https://issues.jboss.org/browse/JASSIST-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shigeru Chiba resolved JASSIST-234.
-----------------------------------
    Fix Version/s: 3.19.0-GA
       Resolution: Done


The patch has been merged.

> 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
>             Fix For: 3.19.0-GA
>
>
> 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