diff options
author | buzbee <buzbee@google.com> | 2014-05-31 08:59:01 -0700 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2014-05-31 09:07:15 -0700 |
commit | 35ba7f3a78d38885ec54e61ed060d2771eeceea7 (patch) | |
tree | ec2d7963f38205bf5eae6b1a35b3f85d0e1da4f8 /compiler/dex/mir_analysis.cc | |
parent | e4e04bbd86d1131b9f380a52a46b1a3b83335d5f (diff) | |
download | art-35ba7f3a78d38885ec54e61ed060d2771eeceea7.zip art-35ba7f3a78d38885ec54e61ed060d2771eeceea7.tar.gz art-35ba7f3a78d38885ec54e61ed060d2771eeceea7.tar.bz2 |
Quick compiler: fix array overrun.
MIRGraph::InlineCalls() was using the MIR opcode to recover
Dalvik instruction flags - something that is only valid for
Dalvik opcodes and not the set of extended MIR opcodes.
This is probably the 3rd or 4th time we've had a bug using
the MIR opcode in situations that are only valid for the Dalvik
opcode subset. I took the opportunity to scan the code for
other cases of this (didn't find any), and did some cleanup while
I was in the neighborhood.
We should probably rework the DalvikOpcode/MirOpcode model whenver we
get around to removing DalvikInstruction from MIR.
Internal bug b/15352667: out-of-bound access in mir_optimization.cc
Change-Id: I75f06780468880892151e3cdd313e14bfbbaa489
Diffstat (limited to 'compiler/dex/mir_analysis.cc')
-rw-r--r-- | compiler/dex/mir_analysis.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc index 508f1c7..7129f8a 100644 --- a/compiler/dex/mir_analysis.cc +++ b/compiler/dex/mir_analysis.cc @@ -902,7 +902,7 @@ void MIRGraph::AnalyzeBlock(BasicBlock* bb, MethodStats* stats) { while (!done) { tbb->visited = true; for (MIR* mir = tbb->first_mir_insn; mir != NULL; mir = mir->next) { - if (static_cast<uint32_t>(mir->dalvikInsn.opcode) >= kMirOpFirst) { + if (IsPseudoMirOp(mir->dalvikInsn.opcode)) { // Skip any MIR pseudo-op. continue; } |