From 79ba6a494fb2097b39f76fe6a4b4b4f407e32a02 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 26 Jun 2018 11:34:34 -0700 Subject: [PATCH] Ignore duplicate module list entries. BUG=chromium:838322 Change-Id: Ie19c1a39e49332b650a618758f925b127026bddf Reviewed-on: https://chromium-review.googlesource.com/1115437 Reviewed-by: Joshua Peraza --- src/processor/minidump.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index d6309877..606a5ddd 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -2725,6 +2725,22 @@ bool MinidumpModuleList::Read(uint32_t expected_size) { 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(); if (!StoreRange(module, base_address, module_index, module_count, is_android)) {