Update address space of map if it changes. am: b5ab758 am: 6acbf09
am: 72d7d9a
* commit '72d7d9a5bcabb91101a404100d7be2ea37eebfc9':
Update address space of map if it changes.
Change-Id: I53a14ca33e2e53ec66d65f010ab79e24ca1211bb
diff --git a/src/elfxx.h b/src/elfxx.h
index 38aa079..bc878c0 100644
--- a/src/elfxx.h
+++ b/src/elfxx.h
@@ -211,6 +211,11 @@
if (map->ei.valid && elf_w (get_load_base) (&map->ei, map->offset, &load_base)) {
map->load_base = load_base;
}
+ } else if (map->ei.valid && !map->ei.mapped && map->ei.u.memory.as != as) {
+ // If this map is only in memory, this might be a cached map
+ // that crosses over multiple unwinds. In this case, we've detected
+ // that the as is stale, so set it to a valid as.
+ map->ei.u.memory.as = as;
}
lock_release (&map->ei_lock, saved_mask);
return map->ei.valid;