summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-02-19 18:36:59 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-02-19 18:36:59 +0000
commit3f43b5f4881db5a1f7bd13a095f720b7c1ddba6a (patch)
tree5fa58b8aac78fb8f7d9e8db68f71fb869f9a1e34
parent6561551f094f79ce569160b29131b07be7aa3363 (diff)
parentf52857f4735a49a2a15305b3d1edf808a126b164 (diff)
Merge "ART: Ensure order of field gaps"
-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,