diff options
author | 2015-06-24 12:41:20 +0100 | |
---|---|---|
committer | 2015-06-24 13:58:20 +0100 | |
commit | 1efcc22cd1895c48adccbe49270d8e8583c2b12d (patch) | |
tree | 9ea6171a7670f8930e219f8a74875c4af19e5c9f /compiler/optimizing | |
parent | 264e63bb899320a779264964aee6b868de25515e (diff) |
Fix another case of un-verified dead code.
bug:22042796
https://code.google.com/p/android/issues/detail?id=178008
Change-Id: Ie77ccf17ce2a69c86b2278f7920aa4ad39bf142b
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/builder.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index c49752642b..2bb6fbe350 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -2109,8 +2109,13 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 case Instruction::MOVE_RESULT: case Instruction::MOVE_RESULT_WIDE: case Instruction::MOVE_RESULT_OBJECT: - UpdateLocal(instruction.VRegA(), latest_result_); - latest_result_ = nullptr; + if (latest_result_ == nullptr) { + // Only dead code can lead to this situation, where the verifier + // does not reject the method. + } else { + UpdateLocal(instruction.VRegA(), latest_result_); + latest_result_ = nullptr; + } break; case Instruction::CMP_LONG: { |