From a3ba96c0d4c780ab7f19ade6121266916712baaf Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Thu, 5 Apr 2018 19:09:44 -0700 Subject: [PATCH] linux: Use an empty string for unmapped module names This may be a bug in the target program or loader, but doesn't seem like something worth dying over. If a link_entry name is empty, ProcessReaderLinux::InitializeModules() will fall back to using the name of the module's mapping. In this case, the main executable's link entry name pointed into unmapped memory, but the memory map was able to identify it as app_process32. Bug: crashpad:30 Change-Id: Ic6df08132271efb809bf0bc28f23a333deb20a67 Reviewed-on: https://chromium-review.googlesource.com/999301 Commit-Queue: Joshua Peraza Reviewed-by: Mark Mentovai --- snapshot/linux/debug_rendezvous.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshot/linux/debug_rendezvous.cc b/snapshot/linux/debug_rendezvous.cc index e47fc0c6..e27768dd 100644 --- a/snapshot/linux/debug_rendezvous.cc +++ b/snapshot/linux/debug_rendezvous.cc @@ -63,7 +63,7 @@ bool ReadLinkEntry(const ProcessMemoryRange& memory, std::string name; if (!memory.ReadCStringSizeLimited(entry.l_name, 4096, &name)) { - return false; + name.clear(); } entry_out->load_bias = entry.l_addr;