diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 12:41:20 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 16:16:25 +0100 |
commit | 310b0f5f15ac9ef8fb7ed0a12ff9ba3e4da17033 (patch) | |
tree | 1c6a8e98be5fb264095725067dc729b87c45af69 /compiler | |
parent | 1a63351b4b68a9ffb4e55ce8185e13cda6893ec1 (diff) | |
download | art-310b0f5f15ac9ef8fb7ed0a12ff9ba3e4da17033.zip art-310b0f5f15ac9ef8fb7ed0a12ff9ba3e4da17033.tar.gz art-310b0f5f15ac9ef8fb7ed0a12ff9ba3e4da17033.tar.bz2 |
Fix another case of un-verified dead code.
bug:22042796
https://code.google.com/p/android/issues/detail?id=178008
(cherry picked from commit 1efcc22cd1895c48adccbe49270d8e8583c2b12d)
Change-Id: I5c0d783e842da39cd3dcbb2f18ccf784e797a64f
Diffstat (limited to 'compiler')
-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 ed39923..b564aca 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -2062,8 +2062,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: { |