Properly remap string indices before asserting equality
authorMilian Wolff <mail@milianw.de>
Fri, 28 Apr 2017 11:24:37 +0000 (13:24 +0200)
committerMilian Wolff <mail@milianw.de>
Fri, 28 Apr 2017 11:24:58 +0000 (13:24 +0200)
The string indices in the IP belong to the other file and thus
will mismatch. We need to remap them before we can commpare the
data in the assertion correctly.

BUG: 379220

src/analyze/accumulatedtracedata.cpp

index ab0c3f4..27d3b61 100644 (file)
@@ -585,7 +585,7 @@ void AccumulatedTraceData::diff(const AccumulatedTraceData& base)
 
     for (const auto& rhsAllocation : base.allocations) {
         const auto lhsTrace = remapTrace(rhsAllocation.traceIndex);
-        assert(base.findIp(base.findTrace(rhsAllocation.traceIndex).ipIndex)
+        assert(remapIp(base.findIp(base.findTrace(rhsAllocation.traceIndex).ipIndex))
                    .equalWithoutAddress(findIp(findTrace(lhsTrace).ipIndex)));
         findAllocation(lhsTrace) -= rhsAllocation;
     }