No description
82d0ff76a6
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 |
||
---|---|---|
android | ||
autotools | ||
m4 | ||
src | ||
.gitignore | ||
aclocal.m4 | ||
AUTHORS | ||
breakpad-client.pc.in | ||
breakpad.pc.in | ||
ChangeLog | ||
codereview.settings | ||
configure | ||
configure.ac | ||
DEPS | ||
INSTALL | ||
LICENSE | ||
Makefile.am | ||
Makefile.in | ||
NEWS | ||
README | ||
README.ANDROID |
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.