Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

crash with useless trycatches #199

Closed Janmm14 closed 1 year ago

Janmm14 commented 1 year ago

I've seen Krakatau crashing with exception handle entries where all 3 labels (start, end, handler) are the same. Should be fine to ignore these instead of crashing. On my phone atm and suddenly remembered I wanted to report this, so no logs / sample.

Storyyeller commented 1 year ago

Thanks, I'll see if I can reproduce that later.

Storyyeller commented 1 year ago

I was unable to reproduce the issue. I tried creating a class with an exception handler where all three labels are the same, but the JVM rejected it, even as far back as Java 8. Since it won't run on the JVM, it's better to just print out an error message rather than trying to handle it in the decompiler, IMO.

Janmm14 commented 1 year ago

I see, weird. Maybe the jar I had in mind was meant to run only with noverify or idk what. Anyway I'll then just continue using my transformer which removes these.