Closed Janmm14 closed 3 years ago
Can you please post the complete disassembly?
issue179.j:77:23: error: Undefined symbolic reference
L82: invokedynamic [id136]
^~~~~~~
Also, have you verified that this code is actually valid in the first place?
Complete jar download at: https://github.com/java-deobfuscator/deobfuscator/issues/748
Sample taken from t.class
, error happens to more methods in that class and other classes.
.const [id136] = InvokeDynamic invokeStatic Method net/runelite/client/plugins/theplug/t llIlIIll (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; : '1' (Lnet/runelite/client/plugins/theplug/t;)Lnet/runelite/client/plugins/theplug/ThePlugLoaderPlugin;
.const [id140] = InvokeDynamic invokeStatic Method net/runelite/client/plugins/theplug/t llIlIIll (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; : '2' (Lnet/runelite/client/plugins/theplug/ThePlugLoaderPlugin;)Lnet/runelite/client/plugins/theplug/p;
Complete disassembly: https://gist.github.com/Janmm14/c8d3e6cb2606fb635577e84f4aa3ad79
As the startUp
method of the main class of that plugin also crashes with the same error, I expect that the given bytecode is valid, however I cannot test this myself as I don't have all the dependencies to run it.
Also the <clinit>
has an invokedynamic to lIIIIlIIl
which fails decompilation with the same excpetion.
The issue is that the classes contained MethodType
constants, which are part of the invokedynamic
mechanism that Krakatau does not support. As a workaroud, I changed it to generate dummy string literals for MethodHandle
and MethodType
constants so that at least it will still decompile.
Thanks for the fast work & fix.
Used krakatau version: latest, not the one in bytecodeviewer. But the one in bytecodeviewer throws a similar error. (slightly different lines)
class version: 55
Also tried with latest pypy2, no change.
Krakatau disassembly: