Mirror of Google Breakpad project
Go to file
Ted Mielczarek ea2e22b352 Make x86-64 frame pointer unwinding stricter
The x86-64 frame pointer-based unwind method will accept values
that aren't valid for the frame pointer register and the return address.
This fixes it to reject non-8-byte-aligned frame pointers, as
well as non-canonical addresses for the return address it finds.

A colleague of mine asked me why Breakpad gave a bad stack
for a crash in our crash-stats system:
https://crash-stats.mozilla.com/report/index/a472c842-2c7b-4ca7-a267-478cf2160405

Digging in, it turns out that the function in frame 0 is a leaf function,
so MSVC doesn't generate an entry in the unwind table for it, so
dump_syms doesn't produce a STACK CFI entry for it in the symbol file.
The stackwalker tries frame pointer unwinding, and %rbp is set to a
value that sort-of works, so it produces a garbage frame 1 and then
is lost. Either of the two checks in this patch would have stopped
the stackwalker from using the frame pointer.

It's possible we could do something smarter on the dump_syms side,
like enumerating all functions and outputing some default STACK CFI rule
for those that don't have unwind info, but that wouldn't fix crashes
from existing builds without re-dumping symbols for them. In any event,
these checks should always pass for valid frame pointer-using functions.

R=mark@chromium.org
BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1263001

Review URL: https://codereview.chromium.org/1902783002 .
2016-04-19 15:20:09 -04:00
android sample_app: enable C++11 for Android builds 2016-04-04 21:35:26 -04:00
autotools autotools: regen w/latest versions 2016-01-25 19:29:06 -05:00
docs Fix the Linux Starter Guide docs 2016-03-22 14:03:09 -04:00
m4 Check for C++11 support in the configure script. 2016-01-08 00:27:48 -08:00
scripts Pass VERBOSE=1 to make check in travis to get failing test output 2016-04-19 15:19:32 -04:00
src Make x86-64 frame pointer unwinding stricter 2016-04-19 15:20:09 -04:00
.gitignore build: clean up .dwo files 2016-01-25 18:40:56 -05:00
.travis.yml Add travis CI config 2016-04-12 14:55:52 -04:00
aclocal.m4 Fix a dependency issue in automake 2016-04-12 14:55:18 -04: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 Change codereview.settings to point to new repo URL. 2015-09-01 17:13:51 -07:00
configure only build dump_syms_mac for x86 hosts 2016-01-27 16:45:21 -05:00
configure.ac only build dump_syms_mac for x86 hosts 2016-01-27 16:45:21 -05:00
DEPS DEPS: roll test libs up to the latest release 2016-01-25 15:10:38 -05: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 Fix a dependency issue in automake 2016-04-12 14:55:18 -04:00
Makefile.in Fix a dependency issue in automake 2016-04-12 14:55:18 -04:00
NEWS Initial import, which includes the Windows client-side dump_syms tool, and 2006-08-25 21:14:45 +00:00
README.ANDROID Update breakpad to support Android NDK r10c 2014-10-21 13:50:27 +00:00
README.md README: link to Travis CI build status 2016-04-15 13:18:32 -04:00

Breakpad

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:

  1. Get a copy of depot_tools repo. http://dev.chromium.org/developers/how-tos/install-depot-tools

  2. Create a new directory for checking out the source code. mkdir breakpad && cd breakpad

  3. Run the fetch tool from depot_tools to download all the source repos. fetch breakpad

  4. 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.

  5. Commit your changes to your local repo and upload them to the server. http://dev.chromium.org/developers/contributing-code e.g. git commit ... && git cl upload ... You will be prompted for credential and a description.

  6. At https://codereview.chromium.org/ 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