Merge "unwindstack: fix dangling pointer in LocalUpdatableMaps." am: 6e0a0dad52 am: b00f9e088e
am: 1cefad993a
Change-Id: I7ca1ef413f478aeebbc0b530efc1ded20a329bad
diff --git a/libunwindstack/Maps.cpp b/libunwindstack/Maps.cpp
index 250e600..0ab68db 100644
--- a/libunwindstack/Maps.cpp
+++ b/libunwindstack/Maps.cpp
@@ -139,6 +139,9 @@
if (start == info->start && end == info->end && flags == info->flags && *name == info->name) {
// No need to check
search_map_idx = old_map_idx + 1;
+ if (new_map_idx + 1 < maps_.size()) {
+ maps_[new_map_idx + 1]->prev_map = info.get();
+ }
maps_[new_map_idx] = nullptr;
total_entries--;
break;