aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-04-04 21:41:50 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-04-04 21:41:50 +0000
commit61ea8bf0d5c2cf652e8d75605f770d0f9733acfe (patch)
treef7e47929e3a366632bd767f1b8beff45aa7ee42e
parentIssue 246: Dynamic_images.* needs to be 64-bit ready. Created types that are ... (diff)
downloadbreakpad-61ea8bf0d5c2cf652e8d75605f770d0f9733acfe.tar.xz
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
-rw-r--r--src/google_breakpad/processor/minidump.h2
-rw-r--r--src/processor/minidump.cc17
2 files changed, 13 insertions, 6 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 9a135d2d..5c5dccc9 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -109,6 +109,8 @@ class MinidumpObject {
public:
virtual ~MinidumpObject() {}
+ bool valid() const { return valid_; }
+
protected:
explicit MinidumpObject(Minidump* minidump);
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index d91332c5..6126ceca 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2279,15 +2279,20 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) {
++module_index) {
MinidumpModule* module = &(*modules)[module_index];
- if (!module->ReadAuxiliaryData()) {
- BPLOG(INFO) << "MinidumpModuleList could not read module auxiliary "
- "data for module " <<
- module_index << "/" << module_count;
- continue;
+ // ReadAuxiliaryData fails if any data that the module indicates should
+ // exist is missing, but we treat some such cases as valid anyway. See
+ // issue #222: if a debugging record is of a format that's too large to
+ // handle, it shouldn't render the entire dump invalid. Check module
+ // 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
- // module->ReadAuxiliaryData.
+ // module->ReadAuxiliaryData or noting that the module is valid.
u_int64_t base_address = module->base_address();
u_int64_t module_size = module->size();