FabricMC / Enigma

This is a fork of cuchaz's Enigma, a deobfuscation/remapping tool for Java software.
GNU Lesser General Public License v3.0
426 stars 112 forks source link

Mis-decompilations/ GOTOs in decompiled sources #537

Closed Guigui220D closed 6 months ago

Guigui220D commented 6 months ago

In the resulting exported source I get things like :

if (!(aobj[i] instanceof String[])) ** GOTO lbl20

Which aren't Java code and I'm guessing the decompilation ends prematurely somewhere.

2xsaiko commented 6 months ago

I don't think the decompilers make any guarantees about outputting valid Java source code. It's good enough in most cases (unless it completely gives up and outputs asm or crashes completely) since it's for reference while mapping only. This looks fine, but if the class is unreadable you can try switching the decompiler from the menu bar.

modmuss50 commented 6 months ago

I agree, this isn't something for enigma to worry too much about.

NebelNidas commented 3 months ago

It's actually quite useful that we don't omit these pseudo-decompiled code segments, since

  1. they're still better than having to look at the raw bytecode and
  2. some decompilers (like JADX) report tokens even while in fallback mode: image