diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index ed6d3b7c0..4e083aec0 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -358,6 +358,11 @@ int main(int argc, char** argv) { } } + std::unique_ptr 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 @@ int main(int argc, char** argv) { // TODO: Use seccomp to lock ourselves down. - std::unique_ptr backtrace_map(BacktraceMap::Create(main_tid)); std::string amfd_data; if (backtrace) {