OSDN Git Service

ART: Use kBadFprBase on mips64 and arm64.
authorVladimir Marko <vmarko@google.com>
Wed, 27 May 2015 13:07:08 +0000 (14:07 +0100)
committerVladimir Marko <vmarko@google.com>
Wed, 27 May 2015 13:11:25 +0000 (14:11 +0100)
Fix incorrect usage of kBadGprBase to avoid misleading and
ambiguous data in crash investigations.

Bug: 21266656
Change-Id: I1de6cd621d770be586f8140e86833769865b42c6

runtime/arch/arm64/context_arm64.cc
runtime/arch/mips/context_mips.cc

index af2f661..5488f9d 100644 (file)
@@ -134,7 +134,7 @@ void Arm64Context::DoLongJump() {
     gprs[i] = gprs_[i] != nullptr ? *gprs_[i] : Arm64Context::kBadGprBase + i;
   }
   for (size_t i = 0; i < kNumberOfDRegisters; ++i) {
-    fprs[i] = fprs_[i] != nullptr ? *fprs_[i] : Arm64Context::kBadGprBase + i;
+    fprs[i] = fprs_[i] != nullptr ? *fprs_[i] : Arm64Context::kBadFprBase + i;
   }
   DCHECK_EQ(reinterpret_cast<uintptr_t>(Thread::Current()), gprs[TR]);
   art_quick_do_long_jump(gprs, fprs);
index f0c893a..24892e9 100644 (file)
@@ -87,7 +87,7 @@ void MipsContext::DoLongJump() {
     gprs[i] = gprs_[i] != nullptr ? *gprs_[i] : MipsContext::kBadGprBase + i;
   }
   for (size_t i = 0; i < kNumberOfFRegisters; ++i) {
-    fprs[i] = fprs_[i] != nullptr ? *fprs_[i] : MipsContext::kBadGprBase + i;
+    fprs[i] = fprs_[i] != nullptr ? *fprs_[i] : MipsContext::kBadFprBase + i;
   }
   art_quick_do_long_jump(gprs, fprs);
 }