summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/class_linker.cc4
-rw-r--r--runtime/image.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f554c61e36..ee66b49e7d 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -157,8 +157,8 @@ struct FieldGapsComparator {
}
bool operator() (const FieldGap& lhs, const FieldGap& rhs)
NO_THREAD_SAFETY_ANALYSIS {
- // Sort by gap size, largest first.
- return lhs.size > rhs.size;
+ // Sort by gap size, largest first. Secondary sort by starting offset.
+ return lhs.size > rhs.size || (lhs.size == rhs.size && lhs.start_offset < rhs.start_offset);
}
};
typedef std::priority_queue<FieldGap, std::vector<FieldGap>, FieldGapsComparator> FieldGaps;
diff --git a/runtime/image.cc b/runtime/image.cc
index 269a07d210..3cb25807c6 100644
--- a/runtime/image.cc
+++ b/runtime/image.cc
@@ -24,7 +24,7 @@
namespace art {
const uint8_t ImageHeader::kImageMagic[] = { 'a', 'r', 't', '\n' };
-const uint8_t ImageHeader::kImageVersion[] = { '0', '1', '3', '\0' };
+const uint8_t ImageHeader::kImageVersion[] = { '0', '1', '4', '\0' };
ImageHeader::ImageHeader(uint32_t image_begin,
uint32_t image_size,