Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: client/linux/minidump_writer/linux_dumper.cc

Issue 1211863002: Adjust breakpad module size to match adjusted start_addr. (Closed) Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698