mirror of
https://github.com/pxb1988/dex2jar.git
synced 2024-11-26 22:50:42 +00:00
the exception handler is dead cause NPE in unssa
fix https://github.com/pxb1988/dex2jar/issues/477
This commit is contained in:
parent
f028437d46
commit
80a81b317f
@ -361,6 +361,8 @@ public class UnSSATransformer implements Transformer {
|
||||
}
|
||||
tos.clear();
|
||||
} else if (stmt.st == ST.LABEL) { //
|
||||
// https://github.com/pxb1988/dex2jar/issues/477
|
||||
// the exception handler is dead and stmt.frame is null
|
||||
LabelStmt label = (LabelStmt) stmt;
|
||||
if (label.phis != null) {
|
||||
for (AssignStmt phiAssignStmt : (List<AssignStmt>) label.phis) {
|
||||
|
@ -646,7 +646,14 @@ public class Dex2Asm {
|
||||
T_multiArray.transform(irMethod);
|
||||
T_voidInvoke.transform(irMethod);
|
||||
T_type.transform(irMethod);
|
||||
T_unssa.transform(irMethod);
|
||||
{
|
||||
// https://github.com/pxb1988/dex2jar/issues/477
|
||||
// dead code found in unssa, clean up
|
||||
T_deadCode.transform(irMethod);
|
||||
T_removeLocal.transform(irMethod);
|
||||
T_removeConst.transform(irMethod);
|
||||
T_unssa.transform(irMethod);
|
||||
}
|
||||
T_trimEx.transform(irMethod);
|
||||
T_ir2jRegAssign.transform(irMethod);
|
||||
}
|
||||
|
BIN
dex-translator/src/test/resources/d2j-error-zips/gh477-1.zip
Normal file
BIN
dex-translator/src/test/resources/d2j-error-zips/gh477-1.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user