Index: client/linux/minidump_writer/linux_dumper.cc |
diff --git a/client/linux/minidump_writer/linux_dumper.cc b/client/linux/minidump_writer/linux_dumper.cc |
index 00d18189d6683030153b0b231f8eaa8597738ef4..43b74ad9de7e4e536e4622aaa21d24705af5a9e0 100644 |
--- a/client/linux/minidump_writer/linux_dumper.cc |
+++ b/client/linux/minidump_writer/linux_dumper.cc |
@@ -510,10 +510,15 @@ void LinuxDumper::LatePostprocessMappings() { |
} |
if (ehdr.e_type == ET_DYN) { |
// Compute the effective load bias for this mapped library, and update |
- // the mapping to hold that rather than |start_addr|. Where the library |
- // does not contain Android packed relocations, GetEffectiveLoadBias() |
- // returns |start_addr| and the mapping entry is not changed. |
- mapping->start_addr = GetEffectiveLoadBias(&ehdr, mapping->start_addr); |
+ // the mapping to hold that rather than |start_addr|, at the same time |
+ // adjusting |size| to account for the change in |start_addr|. Where |
+ // the library does not contain Android packed relocations, |
+ // GetEffectiveLoadBias() returns |start_addr| and the mapping entry |
+ // is not changed. |
+ const uintptr_t load_bias = GetEffectiveLoadBias(&ehdr, |
+ mapping->start_addr); |
+ mapping->size += mapping->start_addr - load_bias; |
Primiano Tucci (use gerrit)
2015/06/25 14:44:01
can load_bias ever be > start_addr (maybe by mista
simonb (inactive)
2015/06/25 15:14:35
From coding errors in the proc/$$/maps or ELF data
|
+ mapping->start_addr = load_bias; |
} |
} |
} |