Ignore duplicate module list entries.

BUG=chromium:838322

Change-Id: Ie19c1a39e49332b650a618758f925b127026bddf
Reviewed-on: https://chromium-review.googlesource.com/1115437
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Lei Zhang 2018-06-26 11:34:34 -07:00
parent fac0e886c8
commit 79ba6a494f

View file

@ -2725,6 +2725,22 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
return false; return false;
} }
// Some minidumps have additional modules in the list that are duplicates.
// Ignore them. See https://crbug.com/838322
uint32_t existing_module_index;
if (range_map_->RetrieveRange(base_address, &existing_module_index,
nullptr, nullptr, nullptr) &&
existing_module_index < module_count) {
const MinidumpModule& existing_module =
(*modules)[existing_module_index];
if (existing_module.base_address() == module.base_address() &&
existing_module.size() == module.size() &&
existing_module.code_file() == module.code_file() &&
existing_module.code_identifier() == module.code_identifier()) {
continue;
}
}
const bool is_android = minidump_->IsAndroid(); const bool is_android = minidump_->IsAndroid();
if (!StoreRange(module, base_address, module_index, module_count, if (!StoreRange(module, base_address, module_index, module_count,
is_android)) { is_android)) {