Open xxDark opened 4 years ago
SpongePowered/Mixin#413
Thanks for taking the time to report this to us. Would it be possible for you to provide us with a (minimal) example jar or source file to start from?
proguard.zip java -cp . Test
Thanks for that. Can you also give us the same classes in a version which isn't processed by ProGuard (and thus working?). That way we can trace the execution and find out where it goes wrong.
Sure. proguard.zip
I'll need to bother you once more. I can't replicate your error.
-injars ./pre
-outjars ./output.jar
-libraryjars <java.home>/lib/rt.jar
-keep class Test {
<methods>;
}
I guess that I provided not transformed class files, sorry. Try on these: dist.zip
Configuration:
-injars app-merged.jar
-outjars dist/app-proguard.jar
-libraryjars libs
-libraryjars <java.home>/lib/rt.jar
-dontshrink
-dontobfuscate
-optimizations class/marking/*,method/marking/*,method/inlining/tailrecursion,code/*
-optimizationpasses 1
-allowaccessmodification
-printmapping roguard.map
-overloadaggressively
-repackageclasses ''
-keepattributes *Annotations*,*Signature*,LineNumberTable,SourceFile
-verbose
-keepclassmembers enum * {
<fields>;
<methods>;
}
-keep class App {
void main(java.lang.String[]);
}
# Keep - Native method names. Keep all native class/method names.
-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
native <methods>;
}
Hello. We are using this awesome framework for our needs (https://github.com/SpongePowered/Mixin) and everything works fine.
However, Proguard breaks valid bytecode after obfuscation. Before Proguard:
After Proguard:
We will attempt to fix that issue in Mixin framework, however, can Proguard: a) Also change instructions? b) Don't touch constant pool in that case? Thanks.
P.S The problem is that INVOKEVIRTUAL requires Methodref, not InterfaceMethodref. That change triggers JVM's verifier.