summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-03-23 11:32:27 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2016-03-24 09:55:18 +0000
commit32cc778aff36c5d99026d9bdef5f75a5b17cfe23 (patch)
tree9b6fffaab3b76314ad19d86267e358f0572a80db /compiler/optimizing
parentdba2b19c845f6bccb43a036fa8602197c3248ff2 (diff)
Do a null check on the sibling in the register allocator.
There may be a lifetime hole between the intervals, which means there is no interval for the given position. Litle sister of https://android-review.googlesource.com/#/c/209336/. bug:27626705 Change-Id: I8082aa5ae2dc37d8fa5d4c430b69e6defa495439
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/register_allocator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index 44bede8ac0..b1f9cbcdfa 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -1931,7 +1931,7 @@ void RegisterAllocator::Resolve() {
// `GetSiblingAt` returns the sibling that contains a position, but there could be
// a lifetime hole in it. `CoversSlow` returns whether the interval is live at that
// position.
- if (sibling->CoversSlow(block->GetLifetimeStart())) {
+ if ((sibling != nullptr) && sibling->CoversSlow(block->GetLifetimeStart())) {
DCHECK(!sibling->HasRegister());
}
}