summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2021-03-08 16:53:54 -0800
committerPeter Collingbourne <pcc@google.com>2021-03-16 10:59:39 -0700
commit314afa119181fd0a8f27f9a1e3c0f07f6d744abd (patch)
treecfc0fb4687795c2f6daa3a0076db2c7a5e812575 /services
parent1bec754c8b6724b5fc78995c374f3d8e40fb2075 (diff)
Support MTE and GWP-ASan features in proto tombstones.
Proto tombstones were missing tagged fault addresses, tagged_addr_ctrl, tags in memory dumps and Scudo and GWP-ASan error reports. Since text tombstones now go via protos, all of these features broke when we switched to text tombstones generated from protos by default. Fix the features by adding support for them to the proto format, tombstone_proto and tombstone_proto_to_text. Bug: 135772972 Bug: 182489365 Change-Id: I3ca854546c38755b1f6410a1f6198a44d25ed1c5
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/os/NativeTombstoneManager.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/os/NativeTombstoneManager.java b/services/core/java/com/android/server/os/NativeTombstoneManager.java
index 9c4c5101cb6c..cc6a8243799d 100644
--- a/services/core/java/com/android/server/os/NativeTombstoneManager.java
+++ b/services/core/java/com/android/server/os/NativeTombstoneManager.java
@@ -411,8 +411,13 @@ public final class NativeTombstoneManager {
processName = stream.readString(Tombstone.PROCESS_NAME);
break;
- case (int) Tombstone.CAUSE:
- long token = stream.start(Tombstone.CAUSE);
+ case (int) Tombstone.CAUSES:
+ if (!crashReason.equals("")) {
+ // Causes appear in decreasing order of likelihood. For now we only
+ // want the most likely crash reason here, so ignore all others.
+ break;
+ }
+ long token = stream.start(Tombstone.CAUSES);
cause:
while (stream.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
switch (stream.getFieldNumber()) {