Storyyeller / Krakatau

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

AttributeError: 'NoneType' object has no attribute 'getSingleTType' #87

Closed samczsun closed 8 years ago

samczsun commented 8 years ago
.method public static main : ([Ljava/lang/String;)V 
    .code stack 1024 locals 10
    .catch [0] from Lb to Lc using Ld
Lb:
        aconst_null
        athrow
Lc:
Ld:
        athrow
        return
    .end code 
.end method 

Looks like mishandling of finally blocks

Storyyeller commented 8 years ago

For the record, Krakatau doesn't believe in finally blocks. .catch [0] is handled exactly the same as .catch java/lang/Throwable

samczsun commented 8 years ago

I've managed to reproduce this without using finally at all, but decided to hold back the second issue unless it wasn't fixed by this. If you would like I can post the assembly for that tomorrow

Storyyeller commented 8 years ago

bring it on :)

Storyyeller commented 8 years ago

In case you were wondering, the problem is that I incorrectly updated simplifyThrows() when I introduced extended basic blocks. Instead of checking the input to the throw instruction for nullness, I checked the output of the ephi, but the later is always non-null, making the check useless.

samczsun commented 8 years ago

bring it on :)

I brought it but you've patched it :(