mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 03:34:17 +01:00
Processor crashes on some truncated minidumps after #222. r=ted.mielczarek
http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/a451668b1ece259f git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@254 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
867df1c652
commit
61ea8bf0d5
@ -109,6 +109,8 @@ class MinidumpObject {
|
|||||||
public:
|
public:
|
||||||
virtual ~MinidumpObject() {}
|
virtual ~MinidumpObject() {}
|
||||||
|
|
||||||
|
bool valid() const { return valid_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit MinidumpObject(Minidump* minidump);
|
explicit MinidumpObject(Minidump* minidump);
|
||||||
|
|
||||||
|
@ -2279,15 +2279,20 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) {
|
|||||||
++module_index) {
|
++module_index) {
|
||||||
MinidumpModule* module = &(*modules)[module_index];
|
MinidumpModule* module = &(*modules)[module_index];
|
||||||
|
|
||||||
if (!module->ReadAuxiliaryData()) {
|
// ReadAuxiliaryData fails if any data that the module indicates should
|
||||||
BPLOG(INFO) << "MinidumpModuleList could not read module auxiliary "
|
// exist is missing, but we treat some such cases as valid anyway. See
|
||||||
"data for module " <<
|
// issue #222: if a debugging record is of a format that's too large to
|
||||||
module_index << "/" << module_count;
|
// handle, it shouldn't render the entire dump invalid. Check module
|
||||||
continue;
|
// validity before giving up.
|
||||||
|
if (!module->ReadAuxiliaryData() && !module->valid()) {
|
||||||
|
BPLOG(ERROR) << "MinidumpModuleList could not read required module "
|
||||||
|
"auxiliary data for module " <<
|
||||||
|
module_index << "/" << module_count;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// It is safe to use module->code_file() after successfully calling
|
// It is safe to use module->code_file() after successfully calling
|
||||||
// module->ReadAuxiliaryData.
|
// module->ReadAuxiliaryData or noting that the module is valid.
|
||||||
|
|
||||||
u_int64_t base_address = module->base_address();
|
u_int64_t base_address = module->base_address();
|
||||||
u_int64_t module_size = module->size();
|
u_int64_t module_size = module->size();
|
||||||
|
Loading…
Reference in New Issue
Block a user