summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-04-11 21:12:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-04-11 21:12:12 +0000
commit80bda17d9810507fa016206fff90acd0e1337a3a (patch)
tree31d7d1dfa55e1572b283407b97f21cdbb7931412
parentd521826f27ea58ac0520887e5df15b35a589802d (diff)
parente719926c78d6b717ecc0d3d1620a757ae3019d20 (diff)
Merge "Don't abort during app image loading with no boot image"
-rw-r--r--runtime/gc/space/image_space.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index a84b366687..fc186b14a2 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -938,9 +938,14 @@ static bool RelocateInPlace(ImageHeader& image_header,
const size_t pointer_size = image_header.GetPointerSize();
gc::Heap* const heap = Runtime::Current()->GetHeap();
heap->GetBootImagesSize(&boot_image_begin, &boot_image_end, &boot_oat_begin, &boot_oat_end);
- CHECK_NE(boot_image_begin, boot_image_end)
- << "Can not relocate app image without boot image space";
- CHECK_NE(boot_oat_begin, boot_oat_end) << "Can not relocate app image without boot oat file";
+ if (boot_image_begin == boot_image_end) {
+ *error_msg = "Can not relocate app image without boot image space";
+ return false;
+ }
+ if (boot_oat_begin == boot_oat_end) {
+ *error_msg = "Can not relocate app image without boot oat file";
+ return false;
+ }
const uint32_t boot_image_size = boot_image_end - boot_image_begin;
const uint32_t boot_oat_size = boot_oat_end - boot_oat_begin;
const uint32_t image_header_boot_image_size = image_header.GetBootImageSize();