diff options
author | Joshua Peraza <jperaza@chromium.org> | 2019-06-11 11:48:14 -0700 |
---|---|---|
committer | Joshua Peraza <jperaza@chromium.org> | 2019-06-11 19:04:02 +0000 |
commit | c2467077b93523c9ab2b8a7548145201dc891328 (patch) | |
tree | 190c20f1a8628593db1aac0065852189828a32bf /src/processor/stackwalker_arm64.h | |
parent | linux: fix broken tests (diff) | |
download | breakpad-c2467077b93523c9ab2b8a7548145201dc891328.tar.xz |
Enable truncation of module ranges
ELF modules are loaded in memory in several, possibly discontiguous,
segments. If the holes between segments are large enough, other things,
possibly other ELF modules may be mapped in that space. Crashpad
records the range of modules as the base address of the lowest mapped
segment to the high address of the highest mapped segment. This means
that when one module is mapped into a hole in another, it appears to
the Breakpad processor as overlapping modules. Module ranges are
relevant to the Breakpad processor during stackwalking for identifying
which module a particular program counter belongs to (i.e. mapping the
address to a module's text segment). This patch addresses this issue of
overlapping modules by truncating the range of the module with the
lower base address. A typical module's text segment is the first loaded
segment which would leave the text segment range unaffected. Module
producers can restrict the size of holes in their ELF modules with the
flag "-Wl,-z,max-page-size=4096", preventing other modules from being
mapped in their address range.
Properly contemplating ELF module address ranges would require
extensions to the minidump format to encode any holes.
crbug.com/crashpad/298
This patch also renames the concept of "shrinking down" (which
truncated the upper of two overlapping ranges) to "truncate upper".
Change-Id: I4599201f1e43918db036c390961f8b39e3af1849
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1646932
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/processor/stackwalker_arm64.h')
0 files changed, 0 insertions, 0 deletions