You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main;
import com.esotericsoftware.reflectasm.MethodAccess;
public class Main {
public static void main(String[] args) {
StringBuilder obj = new StringBuilder("ff");
MethodAccess access = MethodAccess.get(obj.getClass());
System.out.println(access.invoke(obj, "toString"));
}
}
I am getting this error when our ASM dependency (6.1.1) tries to parse the generated subclass bytecode reflectasm/java/lang/StringBuilderMethodAccess:
<< 2018-05-25 10:45:06.643 ERROR 1 Error found instrumenting class reflectasm/java/lang/StringBuilderMethodAccess
<< java.lang.IllegalArgumentException
<< at org.objectweb.asm.ClassReader.readVerificationTypeInfo(ClassReader.java:3138)
<< at org.objectweb.asm.ClassReader.readStackMapFrame(ClassReader.java:3065)
<< at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1812)
<< at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1238)
<< at org.objectweb.asm.ClassReader.accept(ClassReader.java:631)
<< at org.objectweb.asm.ClassReader.accept(ClassReader.java:355)
<< at io.shiftleft.bctrace.asm.Transformer.transform(Transformer.java:128)
<< at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
<< at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
<< at java.lang.ClassLoader.defineClass1(Native Method)
<< at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
<< at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<< at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
<< at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
<< at java.lang.reflect.Method.invoke(Method.java:498)
<< at com.esotericsoftware.reflectasm.AccessClassLoader.defineClass(AccessClassLoader.java:85)
<< at com.esotericsoftware.reflectasm.MethodAccess.get(MethodAccess.java:254)
<< at main.Main.main(Main.java:9)
After debugging this I see the reason is an invalid value of 12 (ITEM_ASM_SHORT) for a verification_type_info of a stack map frame.
I am not sure yet if this is caused by your implementation, or by the ASM dependency your are using, but this bytecode is not valid, and we are suspecting it's one of the reasons for SIGSEGV JVM crashes we are experiencing in some environments.
The text was updated successfully, but these errors were encountered:
When instrumenting this example with our agent:
I am getting this error when our ASM dependency (6.1.1) tries to parse the generated subclass bytecode
reflectasm/java/lang/StringBuilderMethodAccess
:After debugging this I see the reason is an invalid value of 12 (
ITEM_ASM_SHORT
) for averification_type_info
of a stack map frame.I am not sure yet if this is caused by your implementation, or by the ASM dependency your are using, but this bytecode is not valid, and we are suspecting it's one of the reasons for
SIGSEGV
JVM crashes we are experiencing in some environments.The text was updated successfully, but these errors were encountered: