aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/google_breakpad/processor/minidump.h3
-rw-r--r--src/processor/minidump.cc12
2 files changed, 10 insertions, 5 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 785428b8..1ad513df 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -544,7 +544,8 @@ class MinidumpModuleList : public MinidumpStream,
bool StoreRange(const MinidumpModule& module,
uint64_t base_address,
uint32_t module_index,
- uint32_t module_count);
+ uint32_t module_count,
+ bool is_android);
// The largest number of modules that will be read from a minidump. The
// default is 1024.
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index fa21f273..d6309877 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2725,8 +2725,10 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
return false;
}
- if (!StoreRange(module, base_address, module_index, module_count)) {
- if (base_address >= last_end_address) {
+ const bool is_android = minidump_->IsAndroid();
+ if (!StoreRange(module, base_address, module_index, module_count,
+ is_android)) {
+ if (!is_android || base_address >= last_end_address) {
BPLOG(ERROR) << "MinidumpModuleList could not store module "
<< module_index << "/" << module_count << ", "
<< module.code_file() << ", " << HexString(base_address)
@@ -2737,6 +2739,7 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
// If failed due to apparent range overlap the cause may be the client
// correction applied for Android packed relocations. If this is the
// case, back out the client correction and retry.
+ assert(is_android);
module_size -= last_end_address - base_address;
base_address = last_end_address;
if (!range_map_->StoreRange(base_address, module_size, module_index)) {
@@ -2762,7 +2765,8 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
bool MinidumpModuleList::StoreRange(const MinidumpModule& module,
uint64_t base_address,
uint32_t module_index,
- uint32_t module_count) {
+ uint32_t module_count,
+ bool is_android) {
if (range_map_->StoreRange(base_address, module.size(), module_index))
return true;
@@ -2770,7 +2774,7 @@ bool MinidumpModuleList::StoreRange(const MinidumpModule& module,
// entries for JITted code, so ignore these.
// TODO(wfh): Remove this code when Android is fixed.
// See https://crbug.com/439531
- if (IsDevAshmem(module.code_file())) {
+ if (is_android && IsDevAshmem(module.code_file())) {
BPLOG(INFO) << "MinidumpModuleList ignoring overlapping module "
<< module_index << "/" << module_count << ", "
<< module.code_file() << ", " << HexString(base_address) << "+"