[
https://issues.jboss.org/browse/JASSIST-152?page=com.atlassian.jira.plugi...
]
Yanic Inghelbrecht commented on JASSIST-152:
--------------------------------------------
The attached source code demonstrates the issue. The AbstractPropertyHolder.class file is
also included (simply copied from the hibernate 4.0.1 final distribution).
The Main class contains a main method, run it to reproduce the issue. The
AbstractPropertyHolder.class file should be in the current directory when the code is run
(or you need to change the hardcoded filename).
The instrumentation fails for method buildColumnOverride of class AbstractPropertyHolder.
The instrumentation is really simple, it surrounds each call with a try/catch block that
(re)throws the caught exception. Note that if the (re)throw statement is removed the issue
does not occur.
instrumentation fails when building stackmap for local var of array
type : bad array type for AALOAD: null
----------------------------------------------------------------------------------------------------------
Key: JASSIST-152
URL:
https://issues.jboss.org/browse/JASSIST-152
Project: Javassist
Issue Type: Bug
Affects Versions: 3.15.0-GA
Environment: Any
Reporter: Yanic Inghelbrecht
Assignee: Shigeru Chiba
Attachments: demonstration.zip
When trying to instrument the attached org.hibernate.cfg.AbstractPropertyHolder (copied
from the hibernate 4.0.1 final distribution), instrumentation fails with the following
exception :
java.lang.RuntimeException: fatal error:
at javassist.bytecode.stackmap.TypeData$TypeName.getTypeData(TypeData.java:177)
at javassist.bytecode.stackmap.MapMaker.fillStackMap(MapMaker.java:410)
at javassist.bytecode.stackmap.MapMaker.toStackMapBody(MapMaker.java:393)
at javassist.bytecode.stackmap.MapMaker.toStackMap(MapMaker.java:323)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:98)
at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:417)
at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:399)
at javassist.expr.ExprEditor.doit(ExprEditor.java:113)
at javassist.CtBehavior.instrument(CtBehavior.java:672)
at test_abstractpropertyholder.SimpleTranslator.modify(SimpleTranslator.java:25)
at test_abstractpropertyholder.SimpleTranslator.onLoad(SimpleTranslator.java:19)
at
test_abstractpropertyholder.JavassistInstrumenter.getInstrumentedClass(JavassistInstrumenter.java:21)
at test_abstractpropertyholder.Main.main(Main.java:32)transforming
org.hibernate.cfg.AbstractPropertyHolder
Caused by: javassist.bytecode.BadBytecode: bad array type for AALOAD: null
at javassist.bytecode.stackmap.TypeData$ArrayElement.getName(TypeData.java:422)
at javassist.bytecode.stackmap.TypeData$TypeName.getExpected(TypeData.java:292)
at javassist.bytecode.stackmap.TypeData$TypeName.getTypeData(TypeData.java:175)
... 12 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira