Merge "crash_dump: read /proc/<pid>/maps before dropping capabilities."
am: 59b8e35939
Change-Id: I5ee0d4d791ae17b4f3c3eff985d8f94938dbbe19
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp
index ed6d3b7..4e083ae 100644
--- a/debuggerd/crash_dump.cpp
+++ b/debuggerd/crash_dump.cpp
@@ -358,6 +358,11 @@
}
}
+ std::unique_ptr<BacktraceMap> backtrace_map(BacktraceMap::Create(main_tid));
+ if (!backtrace_map) {
+ LOG(FATAL) << "failed to create backtrace map";
+ }
+
// Drop our capabilities now that we've attached to the threads we care about.
drop_capabilities();
@@ -365,7 +370,6 @@
// TODO: Use seccomp to lock ourselves down.
- std::unique_ptr<BacktraceMap> backtrace_map(BacktraceMap::Create(main_tid));
std::string amfd_data;
if (backtrace) {