Bug:
19827056
Change-Id: I12eaf717f1a4b9bd5e0c8e2a508df9da4e61c4ec
int32_t test_val = shadow_frame.GetVReg(inst->VRegA_31t(inst_data));
DCHECK_EQ(switch_data[0], static_cast<uint16_t>(Instruction::kSparseSwitchSignature));
uint16_t size = switch_data[1];
- DCHECK_GT(size, 0);
+ // Return length of SPARSE_SWITCH if size is 0.
+ if (size == 0) {
+ return 3;
+ }
const int32_t* keys = reinterpret_cast<const int32_t*>(&switch_data[2]);
DCHECK(IsAligned<4>(keys));
const int32_t* entries = keys + size;