How do I overcome the “VerifyError:Expecting a stackmap frame” for a JDK 7/8 application?

北战南征 提交于 2019-12-01 10:32:22

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

Ramesh Subramanian

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!