summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-02-06 13:22:01 -0800
committerChristopher Ferris <cferris@google.com>2015-02-06 15:00:09 -0800
commit12385e3ad085aa1ac06c26529b32b688503a9fcf (patch)
treec73a344e4e481a95eae2e9a9fb2216ec09cf64a3 /debuggerd
parent6289412222bfe26ebeef2ea9c422e828c11ffc30 (diff)
downloadsystem_core-12385e3ad085aa1ac06c26529b32b688503a9fcf.zip
system_core-12385e3ad085aa1ac06c26529b32b688503a9fcf.tar.gz
system_core-12385e3ad085aa1ac06c26529b32b688503a9fcf.tar.bz2
Move map data into backtrace data proper.
The backtrace structure used to include a pointer to a backtrace_map_t that represented the map data for a particular pc. This introduced a race condition where the pointer could be discarded, but the backtrace structure still contained a pointer to garbage memory. Now all of the map information is right in the structure. Bug: 19028453 Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/tombstone.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index 38e9d17..11a15d6 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -240,12 +240,13 @@ static void dump_stack_segment(
break;
}
- const backtrace_map_t* map = backtrace->FindMap(stack_content);
+ backtrace_map_t map;
+ backtrace->FillInMap(stack_content, &map);
const char* map_name;
- if (!map) {
+ if (BacktraceMap::IsValid(map)) {
map_name = "";
} else {
- map_name = map->name.c_str();
+ map_name = map.name.c_str();
}
uintptr_t offset = 0;
std::string func_name(backtrace->GetFunctionName(stack_content, &offset));