OSDN Git Service

ART: fix highest PC values removal in SrcMap.DeltaFormat()
authorYevgeny Rouban <yevgeny.y.rouban@intel.com>
Tue, 16 Sep 2014 04:29:26 +0000 (11:29 +0700)
committerYevgeny Rouban <yevgeny.y.rouban@intel.com>
Tue, 16 Sep 2014 12:43:23 +0000 (12:43 +0000)
The conversion from absolute to offset Line Number Table values mistakenly
removed all values less than the highest one, which resulted in clearing
all the table.

The fix is to use the reverse condition finding the highest correct PC
value in the sorted table.

Change-Id: I9850c2c46c1910b809043dd8163eb930a7849ded
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
compiler/compiled_method.h

index 3e34144..cc46b92 100644 (file)
@@ -154,7 +154,7 @@ class SrcMap FINAL : public std::vector<SrcMapElem> {
       // get rid of the highest values
       size_t i = size() - 1;
       for (; i > 0 ; i--) {
-        if ((*this)[i].from_ >= highest_pc) {
+        if ((*this)[i].from_ < highest_pc) {
           break;
         }
       }