diff options
| author | 2015-02-19 18:36:59 +0000 | |
|---|---|---|
| committer | 2015-02-19 18:36:59 +0000 | |
| commit | 3f43b5f4881db5a1f7bd13a095f720b7c1ddba6a (patch) | |
| tree | 5fa58b8aac78fb8f7d9e8db68f71fb869f9a1e34 /runtime/class_linker.cc | |
| parent | 6561551f094f79ce569160b29131b07be7aa3363 (diff) | |
| parent | f52857f4735a49a2a15305b3d1edf808a126b164 (diff) | |
Merge "ART: Ensure order of field gaps"
Diffstat (limited to 'runtime/class_linker.cc')
| -rw-r--r-- | runtime/class_linker.cc | 4 |
1 files changed, 2 insertions, 2 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; |