-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.VerifyError: Expecting a stackmap frame at branch target 14 #411
Comments
Update: I was able to resolve this. I just want to obfuscate one package and want to keep rest of my classes as it is, still I guess proguard is modifying the byte code of the class I added as Keep in the pro rules. sample.pro -keep interface java.** { ; } #-dontnote kotlin.** -keep class com.xxx.yyyy.service.* { -keep class com.xxx.yyyy.input.* { -keep class com.xxx.yyyy.enrichstatement.domain.entity.** { -keep interface com.xxx.yyyy.relationshipextraction.domain.* { -keep interface com.xxx.yyyy.relationshipextraction.services.* { -keep enum ** { -keepclassmembers class ** { -keepclassmembers class ** { -keep class com.xxx.yyyy.commons.dictionary.* { -keepattributes Signature -dontshrink Thanks in advance |
If you're running code on the JVM then you must preverify the classes: so you should remove If you enable any of shrinking, optimization or obfuscation, then the stackmap frames are removed at the beginning of ProGuard here. The preverification is then executed at the end of ProGuard to recompute the stackmap frames after any modifications that ProGuard would have made due to shrinking, optimization or obfuscation here. It's not clear how your problem is related to your configuration though. Can you provide a reproducible sample? |
Hi @mrjameshamilton, |
Hi Team,
While obfuscation my Shadow Jar which is dependent on multiple modules I have added rule to keep class inside one package
-keep class com.service.** {
*;
}
Still I can see that proguard is modifying the byteCode irrespective of using above rule.
I have tried everything like
-dontshrink
-dontoptimize
-dontpreverify
also used
-keepattributes SourceFile,ConstantValue,LineNumberTable,RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations,StackMapTable,EnclosingMethod
ERROR BELOW:
java.lang.VerifyError: Expecting a stackmap frame at branch target 14
Exception Details:
Location:
com//service/Service.$getStaticMetaClass()Lgroovy/lang/MetaClass; @6: if_acmpeq
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2ab6 005e 1207 a500 082a b800 63b0 b200
0000010: 224c 2bc7 000f 2ab6 005e b800 6059 4cb3
0000020: 0022 2bb6 0061 b0
I believe Proguard should not change the byteCode of the class file if I use to -keep it using pro rule.
Sample Bytecode is attached showing obfuscated and original class file.
KryoFactory_getKryoInstance_closure1_obfuscate.txt
KryoFactory_getKryoInstance_closure1_original.txt
The text was updated successfully, but these errors were encountered: