I am using ASM 5.0.3 bytecode modification library with Tomcat 8 and JDK 8.
My intention is to inject bytecode successfully into all the classes. However, I encount
Use the ClassWriter#COMPUTE_FRAMES flag for the stack map frames to be recomputed. The bytecode verifier uses typechecker (stack map) from JDK 7 on, so that's why your code works on JDK 6.
Note that (from COMPUTE_FRAMES
JavaDoc):
computeFrames implies computeMaxs
I fixed the issue, after extending ClassWriter class and override the method getCommonSuperClass.
Please check this ASM 5.0.3 With Java 1.8 incorrect maxStack with Java.lang.VerifyError: Operand stack overflow