Modify minidump_stackwalk to be more tolerant of overlapping ranges.

These ranges can be seen in some Android minidumps.

BUG=chromium:439531
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/9744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1412 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
wfh@chromium.org 2014-12-20 00:47:07 +00:00
parent ba16fd3ffc
commit 30d41ec243

View file

@ -2548,12 +2548,26 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
}
if (!range_map_->StoreRange(base_address, module_size, module_index)) {
BPLOG(ERROR) << "MinidumpModuleList could not store module " <<
module_index << "/" << module_count << ", " <<
module->code_file() << ", " <<
HexString(base_address) << "+" <<
HexString(module_size);
return false;
// Android's shared memory implementation /dev/ashmem can contain
// duplicate entries for JITted code, so ignore these.
// TODO(wfh): Remove this code when Android is fixed.
// See https://crbug.com/439531
const string kDevAshmem("/dev/ashmem/");
if (module->code_file().compare(
0, kDevAshmem.length(), kDevAshmem) != 0) {
BPLOG(ERROR) << "MinidumpModuleList could not store module " <<
module_index << "/" << module_count << ", " <<
module->code_file() << ", " <<
HexString(base_address) << "+" <<
HexString(module_size);
return false;
} else {
BPLOG(INFO) << "MinidumpModuleList ignoring overlapping module " <<
module_index << "/" << module_count << ", " <<
module->code_file() << ", " <<
HexString(base_address) << "+" <<
HexString(module_size);
}
}
}