Do not crash if the minidump is missing a module list
This commit is contained in:
parent
cfc925acff
commit
7aeabf23b5
@ -743,6 +743,21 @@ class UploadThread: public IThread
|
||||
return kPRLocalError;
|
||||
}
|
||||
|
||||
// Minidumps missing a module list are basically useless
|
||||
if (!processState.modules()) {
|
||||
return kPRLocalError;
|
||||
}
|
||||
|
||||
std::string os_short = "";
|
||||
std::string cpu_arch = "";
|
||||
if (processState.system_info()) {
|
||||
os_short = processState.system_info()->os_short;
|
||||
if (os_short.empty()) {
|
||||
os_short = processState.system_info()->os;
|
||||
}
|
||||
cpu_arch = processState.system_info()->cpu;
|
||||
}
|
||||
|
||||
int requestingThread = processState.requesting_thread();
|
||||
if (requestingThread == -1) {
|
||||
requestingThread = 0;
|
||||
@ -759,7 +774,7 @@ class UploadThread: public IThread
|
||||
}
|
||||
|
||||
std::ostringstream summaryStream;
|
||||
summaryStream << 2 << "|" << processState.time_date_stamp() << "|" << processState.system_info()->os_short << "|" << processState.system_info()->cpu << "|" << processState.crashed() << "|" << processState.crash_reason() << "|" << std::hex << processState.crash_address() << std::dec << "|" << requestingThread;
|
||||
summaryStream << 2 << "|" << processState.time_date_stamp() << "|" << os_short << "|" << cpu_arch << "|" << processState.crashed() << "|" << processState.crash_reason() << "|" << std::hex << processState.crash_address() << std::dec << "|" << requestingThread;
|
||||
|
||||
std::map<const google_breakpad::CodeModule *, unsigned int> moduleMap;
|
||||
|
||||
|
@ -175,6 +175,21 @@ int main(int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
|
||||
// Minidumps missing a module list are basically useless
|
||||
if (!processState.modules()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string os_short = "";
|
||||
std::string cpu_arch = "";
|
||||
if (processState.system_info()) {
|
||||
os_short = processState.system_info()->os_short;
|
||||
if (os_short.empty()) {
|
||||
os_short = processState.system_info()->os;
|
||||
}
|
||||
cpu_arch = processState.system_info()->cpu;
|
||||
}
|
||||
|
||||
int requestingThread = processState.requesting_thread();
|
||||
if (requestingThread == -1) {
|
||||
requestingThread = 0;
|
||||
@ -191,7 +206,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
std::ostringstream summaryStream;
|
||||
summaryStream << 2 << "|" << processState.time_date_stamp() << "|" << processState.system_info()->os_short << "|" << processState.system_info()->cpu << "|" << processState.crashed() << "|" << processState.crash_reason() << "|" << std::hex << processState.crash_address() << std::dec << "|" << requestingThread;
|
||||
summaryStream << 2 << "|" << processState.time_date_stamp() << "|" << os_short << "|" << cpu_arch << "|" << processState.crashed() << "|" << processState.crash_reason() << "|" << std::hex << processState.crash_address() << std::dec << "|" << requestingThread;
|
||||
|
||||
std::map<const CodeModule *, unsigned int> moduleMap;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user