ahat: fix bug parsing ids with the high bit set.
With this fix, ahat will no longer generate broken links for objects
with ids greater than 0x7FFFFFFF.
Bug: 69706820
Test: m ahat-test
Test: Manually heap dump from b/69706820 and verify ids parsed correctly.
Test: Automated test planned for followup as part of b/69706820.
Change-Id: Ie49f49f8959953cff54a543eb7a25bed806b7f1c
diff --git a/tools/ahat/src/main/com/android/ahat/heapdump/Parser.java b/tools/ahat/src/main/com/android/ahat/heapdump/Parser.java
index d7b1dd7..3bed29b 100644
--- a/tools/ahat/src/main/com/android/ahat/heapdump/Parser.java
+++ b/tools/ahat/src/main/com/android/ahat/heapdump/Parser.java
@@ -853,7 +853,7 @@
}
public long getId() {
- return mBuffer.getInt();
+ return mBuffer.getInt() & 0xFFFFFFFFL;
}
public boolean getBool() {