Prevent OP_INVOKE_DIRECT_EMPTY from terminating a trace
diff --git a/vm/compiler/codegen/arm/Codegen.c b/vm/compiler/codegen/arm/Codegen.c
index 16779d9..e034238 100644
--- a/vm/compiler/codegen/arm/Codegen.c
+++ b/vm/compiler/codegen/arm/Codegen.c
@@ -2714,9 +2714,12 @@
static bool handleFmt35c_3rc(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
ArmLIR *labelList)
{
- ArmLIR *retChainingCell = &labelList[bb->fallThrough->id];
+ ArmLIR *retChainingCell;
ArmLIR *pcrLabel = NULL;
+ if (bb->fallThrough != NULL)
+ retChainingCell = &labelList[bb->fallThrough->id];
+
DecodedInstruction *dInsn = &mir->dalvikInsn;
switch (mir->dalvikInsn.opCode) {
/*
diff --git a/vm/interp/Jit.c b/vm/interp/Jit.c
index 8a5843b..ff17ef2 100644
--- a/vm/interp/Jit.c
+++ b/vm/interp/Jit.c
@@ -246,6 +246,8 @@
interpState->totalTraceLen++;
interpState->currRunLen += len;
if ( ((flags & kInstrUnconditional) == 0) &&
+ /* don't end trace on INVOKE_DIRECT_EMPTY */
+ (decInsn.opCode != OP_INVOKE_DIRECT_EMPTY) &&
((flags & (kInstrCanBranch |
kInstrCanSwitch |
kInstrCanReturn |