No description
Find a file
rmcilroy@chromium.org 82d0ff76a6 Extend mapping merge to include reserved but unused mappings.
When parsing /proc/pid/maps, current code merges adjacent entries that
refer to the same library and where the start of the second is equal to
the end of the first, for example:

  40022000-40025000 r-xp 00000000 b3:11 827        /system/lib/liblog.so
  40025000-40026000 r--p 00002000 b3:11 827        /system/lib/liblog.so
  40026000-40027000 rw-p 00003000 b3:11 827        /system/lib/liblog.so

When the system linker loads a library it first reserves all the address
space required, from the smallest start to the largest end address, using
an anonymous mapping, and then maps loaded segments inside that reservation.
If the loaded segments do not fully occupy the reservation this leaves
gaps, and these gaps prevent merges that should occur from occurring:

  40417000-4044a000 r-xp 00000000 b3:11 820        /system/lib/libjpeg.so
> 4044a000-4044b000 ---p 00000000 00:00 0
  4044b000-4044c000 r--p 00033000 b3:11 820        /system/lib/libjpeg.so
  4044c000-4044d000 rw-p 00034000 b3:11 820        /system/lib/libjpeg.so

Where the segments that follow this gap do not contain executable code
the failure to merge does not affect breakpad operation.  However, where
they do then the merge needs to occur.  Packing relocations in a large
library splits the executable segment into two, resulting in:

  73b0c000-73b21000 r-xp 00000000 b3:19 786460     /data/.../libchrome.2160.0.so
> 73b21000-73d12000 ---p 00000000 00:00 0
  73d12000-75a90000 r-xp 00014000 b3:19 786460     /data/.../libchrome.2160.0.so
  75a90000-75c0d000 rw-p 01d91000 b3:19 786460     /data/.../libchrome.2160.0.so

Here the mapping at 73d12000-75a90000 must be merged into 73b0c000-73b21000
so that breakpad correctly calculates the base address for text.

This change enables the full merge by also merging anonymous maps which
result from unused reservation, identified as '---p' with offset 0, and
which follow on from an executable mapping, into that executable mapping.

BUG=chromium:394703
R=rmcilroy@chromium.org, thestig@chromium.org

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

Patch from Simon Baldwin <simonb@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1380 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-09-19 15:00:04 +00:00
android Misc Android-related fixes. 2013-12-13 16:49:11 +00:00
autotools make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
m4 Issue 378 - Don't compile Linux client libraries on non-Linux systems 2010-08-31 15:09:01 +00:00
src Extend mapping merge to include reserved but unused mappings. 2014-09-19 15:00:04 +00:00
.gitignore Move build configuration to root of repository. 2014-04-03 18:34:24 +00:00
aclocal.m4 make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
AUTHORS Make build system less annoying (#8) r=bryner 2006-08-30 20:05:05 +00:00
breakpad-client.pc.in make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
breakpad.pc.in make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
ChangeLog Initial import, which includes the Windows client-side dump_syms tool, and 2006-08-25 21:14:45 +00:00
codereview.settings Add codereview.settings so we can use gcl. 2010-06-19 02:48:54 +00:00
configure make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
configure.ac make "make install" also install headers and pkgconfig files 2014-08-27 02:10:55 +00:00
DEPS Move build configuration to root of repository. 2014-04-03 18:34:24 +00:00
INSTALL autoreconf -f -i 2013-12-10 17:53:50 +00:00
LICENSE Renaming file COPYING to LICENSE and appending the disclaimer from src/common/convert_UTF.h to LICENSE. 2014-02-27 19:23:16 +00:00
Makefile.am Introduce stub microdump processor classes. 2014-09-10 19:12:30 +00:00
Makefile.in Introduce stub microdump processor classes. 2014-09-10 19:12:30 +00:00
NEWS Initial import, which includes the Windows client-side dump_syms tool, and 2006-08-25 21:14:45 +00:00
README Update readme and fix glog properties. 2010-08-13 18:49:03 +00:00
README.ANDROID Fix the Android/MIPS build. 2013-09-25 13:47:44 +00:00

Breakpad is a set of client and server components which implement a
crash-reporting system.


-----
Getting started in 32-bit mode (from trunk)
Configure: CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure
    Build: make
     Test: make check
  Install: make install

If you need to reconfigure your build be sure to run "make distclean" first.


-----
To request change review:
0. Get access to a read-write copy of source.
   Owners at http://code.google.com/p/google-breakpad/ are able to grant
   this access.

1. Check out a read-write copy of source using instructions at
   http://code.google.com/p/google-breakpad/source/checkout

2. Make changes. Build and test your changes.
   For core code like processor use methods above.
   For linux/mac/windows, there are test targets in each project file.

3. Download http://codereview.appspot.com/static/upload.py

4. Run upload.py from the 'src' directory:
   upload.py --server=breakpad.appspot.com

   You will be prompted for credential and a description.

5. At http://breakpad.appspot.com you'll find your issue listed; click on it,
   and select Publish+Mail, and enter in the code reviewer and CC
   google-breakpad-dev@googlegroups.com

6. When applying code review feedback, specify the '-i' option when running
   upload.py again and pass the issue number so it updates the existing issue,
   rather than creating a new one.
   Be sure to rerun upload.py from the same directory as you did for previous
   uploads to allow for proper diff calculations.