Commit Graph

158 Commits

Author SHA1 Message Date
Ryo Hashimoto
a5d7afb38b Add src/processor/stackwalk_common.{cc,h} to src_libbreakpad_a_SOURCES
To generate the out directory before compiling stackwalk_common.cc.

Makefile.in and aclocal.m4 were generated by running `aclocal &&
automake`.

BUG=chromium:1167503
BUG=b:177451284
TEST=./configure && make

Change-Id: I7a7674aa5f81cf0016eb2f5170ea3676ccfe3bbb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2659000
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2021-01-29 12:43:57 +00:00
Eric Astor
86c090b77f Do not build core_handler unless memfd_create is available
Restores build compatibility with glibc < 2.27.

Change-Id: I1e58ab5e15d7691ad076769a52260fa01c9cfd06
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2597562
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-12-21 22:07:02 +00:00
Snehasish Kumar
83203748ae Add a test to check debug information for split functions.
With optimizations such as -fsplit-machine-functions (clang) and
-freorder-blocks-and-partition (gcc), the function body may be
discontiguous in the binary. Control flow between the parts are routed
using jumps. This test ensures that breakpad consumes debuginfo
generated by the -fsplit-machine-functions optimization and the line
table for the cold function part is correct.

Change-Id: I44d59704864ee940dd429c5249d5d793fe081d6a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2591951
Reviewed-by: Sterling Augustine <saugustine@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2020-12-15 17:14:09 +00:00
Snehasish Kumar
57ce4032f5 Add dwarf2reader unit test to run with make check.
This change updates Makefile.am to include the dwarf2reader lineinfo
unittest to the suite of tests run when make check is invoked. All the
manual changes are limited to the Makefile.am file. The remaining files
contain changes generated by automake.

Change-Id: Ib078391b44235ce430a224713512637ce8e90a36
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2587266
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2020-12-11 21:39:03 +00:00
Ludovic Guegan
78f7ae495b pid2md: generate a minidump from a running process
On Linux, this tool generates a minidump for given process. It requires
the permission to trace the process and access its /proc directory. This
is useful when a defective behavior of a process does not lead to a
crash. For example, it can be used by a watchdog or if a process does
not correctly respond to a termination request.

Change-Id: Iab501e42c064a537aea62831c471e395ff697186
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2539920
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-11-24 08:18:56 +00:00
Ludovic Guegan
bd4a28c08b core_handler: coredump handler to produce minidump
On Linux, it is possible to register a core handler via
/proc/sys/kernel/core_pattern. Doing so invokes the core handler when
a process crash. The core_handler uses /proc/<pid>/mem to access the
process memory. This way it is not necessary to process the full
coredump which takes time and consumes memory.

In order to profit from this core handler, for example, one can
integrate dump_syms into Yocto and generate an archive with the
breakpad symbols of all the binaries in the rootfs. Minidumps are
especially useful on embedded systems since they are lightweight and
provide contextual information.

Change-Id: I9298d81159029cefb81c915831db54884310ad05
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2536917
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-11-23 23:15:15 +00:00
Michael Forney
e780d58fd7 Use breakpad_getcontext on all Linux platforms missing getcontext
getcontext is also not available on musl libc, so generalize
breakpad_getcontext so it can be used as a fallback for non-Android
platforms as well.

On x86_64 and i386, ucontext_t uses an Android-specific offset for
storage of FP registers, since its sigset_t differs in size. So,
make the definition of MCONTEXT_FPREGS_MEM and UCONTEXT_FPREGS_MEM_OFFSET
conditional on whether we are building for Android.

On glibc and musl, signal.h and asm/sigcontext.h can't be included
together, so in breakpad_context_unittest.cc, only compare the libc
and kernel _fpstate when on Android.

Bug: google-breakpad:631
Change-Id: If81d73c4101bae946e9a3655b8d1c40a34ab6c38
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2102135
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-03-16 21:27:07 +00:00
Michael Forney
98c883b5cf Remove redundant LINUX_HOST conditional
We are already in a LINUX_HOST conditional block, so there is no need
to check for it again.

Change-Id: Ifbe283ffa47373c98d2653f1014445d1a435c715
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2093144
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-03-11 11:49:47 +00:00
Nelson Billing
bbad9f255d Add optional new symbol upload API to sym_upload.
Change-Id: I6a49e9f4a699fa6f5f8e9f0fc86afb4cb342a442
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1422400
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2020-02-20 16:50:31 +00:00
Jon Turney
62f10f30ba Fix 'make distcheck'
Update EXTRA_DIST to allow 'make distcheck' to work

Change-Id: I2f840e6e86039d590af601a55e20fb9f6caf3a08
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1924253
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2019-11-19 15:20:39 +00:00
Mike Frysinger
db1cda2653 convert_UTF: rewrite in C++
This allows us to namespace the symbols properly.

Bug: google-breakpad:725
Change-Id: Iea8052547eef6c0acb299c1995781735c6d8994f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1769236
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-09-04 20:25:23 +00:00
Mike Frysinger
ef04c9c028 string_conversion: fix pointer math
Since target_ptr is of type uint16_t* already, we don't need to scale
the byte count as the language does that for us.  If it were void*, we
would need this code, but it's not.

In practice it's probably not a big deal due to how we preallocated
memory: when converting UTF8->UTF16, we'd reserve the same number of
code units, and UTF8 takes more code units per codepoint than UTF16,
so the UTF16 vector is always oversized.

When converting UTF32->UTF16, we also reserve the same number of
code units, but since one UTF32 code unit could require two UTF16
code units (for U+10000 codepoints and higher), we would probably
corrupt memory in the process.  The APIs in this module don't seem
to take into account that range in general, so for now I'm only
fixing the memory corruption.

Bug: google-breakpad:768
Change-Id: Ibfaea4e866733ff8d99b505e72c500bd40d11a74
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1732888
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-08-05 17:38:16 +00:00
Joshua Peraza
c2467077b9 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>
2019-06-11 19:04:02 +00:00
Gabriele Svelto
16e08520e6 Add support for parsing the DW_AT_ranges attributes
This enables the DWARF reader to properly parse DW_AT_ranges attributes
in compilation units and functions. Code covered by a function is now
represented by a vector of ranges instead of a single contiguous range
and DW_AT_ranges entries are used to populate it. All the code and tests
that assumed functions to be contiguous entities has been updated to
reflect the change. DW_AT_ranges attributes found in compilation units
are parsed but no data is generated for them as it is not currently needed.

BUG=754

Change-Id: I310391b525aaba0dd329f1e3187486f2e0c6d442
Reviewed-on: https://chromium-review.googlesource.com/1124721
Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
2018-08-13 19:12:00 +00:00
Joshua Peraza
88d8114fda Define and use a a new MDRawContextARM64
This struct matches the layout defined by Microsoft and replaces
Breakpad's MDRawContextARM64_Old. This CL updates the processor to
understand either the old or new structs, but clients continue to write
the old structs.

Change-Id: I8dedd9ddb2ec083b802723b9ac87beb18d98edbd
Reviewed-on: https://chromium-review.googlesource.com/1155938
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-08-01 19:27:25 +00:00
Lars Volker
49907e1c34 Fix Travis build by running tests as root
A recent configuration change made it necessary to run our tests on
Travis as root.

This change also increases the timeout of ParallelChildCrashesDontHang
to make it pass in Travis virtualized containers.

Bug: google-breakpad:753
Change-Id: I6ca8ff4513c6ea3e0646f22457f28b5c4fca6654
Reviewed-on: https://chromium-review.googlesource.com/890564
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2018-02-20 11:08:52 +00:00
Tobias Sargeant
072f86ca83 Provide helper wrappers for basename(3) and dirname(3)
This hides the need to provide mutable C strings, and unifies
existing basename calls and variations in a single location.

Change-Id: Idfb449c47b1421f1a751efc3d7404f15f8b369ca
Reviewed-on: https://chromium-review.googlesource.com/725731
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2017-10-18 15:44:59 +00:00
Ted Mielczarek
8bb3d55af7 Rename src/common/memory.h to memory_allocator.h.
memory.h shadows a system header which normally isn't a problem
because of the include paths in Breakpad, but the Firefox build
system winds up with src/common in the include path so we've had
a workaround for this for years. Renaming the file lets us get
rid of that workaround and shouldn't hurt anything.

Change-Id: I3b7c4239dc77f3b2b7cf2b572a0cad88cd7e8522
Reviewed-on: https://chromium-review.googlesource.com/723261
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-10-17 14:02:43 +00:00
Tobias Sargeant
dea867e76f Add new test data to Makefile.am
This should have been done as part of 2b3be5

Bug: google-breakpad:746
Change-Id: I7eae33166cff238d72293e659abc90e724b365dc
Reviewed-on: https://chromium-review.googlesource.com/667102
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2017-09-14 20:54:34 +00:00
Mike Frysinger
0842e530e1 google_crashdump_uploader_test: integrate test into normal build
This is turned on in the gyp file, but not our automake build.  Include
it there to make sure we don't break it and keep coverage up.

Bug: google-breakpad:360
Change-Id: If54ff04e62641b1c4a550db8a09f5ac09ff8765c
Reviewed-on: https://chromium-review.googlesource.com/665798
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-09-13 21:56:40 +00:00
Mike Frysinger
6cc037526e autotools: move -W flags to configure detection
This lets us use the flags with clang, and to add more flags easily.

Change-Id: I51bb53ffd5ab6da769cdfb422a2c88442f1ff9ad
Reviewed-on: https://chromium-review.googlesource.com/441864
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2017-02-16 22:48:56 +00:00
Mike Frysinger
93c447a0de turn on -Werror generally
This moves us to being warning free by default rather than being
free of some specific warnings.  This doesn't turn on any new
warnings though.

Change-Id: I60bb79d1790e85ec4618b3548dad6de5d9bf8ab5
Reviewed-on: https://chromium-review.googlesource.com/438565
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-02-13 17:55:06 +00:00
Mike Frysinger
7515ab1376 microdump_stackwalk_test: fix bashism in test
These are /bin/sh scripts, and `source` is a bash-specific command.
Switch to the portable `.` command instead.

Change-Id: I51d8253b26aa61c130bb5fdc4789f8d623c6d9db
Reviewed-on: https://chromium-review.googlesource.com/414524
Reviewed-by: Primiano Tucci <primiano@chromium.org>
2016-11-25 04:53:01 +00:00
Orgad Shaneh
33c24776f3 Upgrade google test to 1.8.0
Some test fail on recent debian with 1.7.0 due to crashes.

Change-Id: Ia25625c27968671e24826a3eeae70dbfa5c67c95
Reviewed-on: https://chromium-review.googlesource.com/412701
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2016-11-23 23:04:33 +00:00
Ted Mielczarek
2ecb2baba8 Don't demangle Rust symbols by default, but allow linking to rust-demangle.
The Rust compiler uses GCC C++ name mangling, but it has another layer of
encoding so abi::cxa_demangle doesn't produce great results. This patch
changes dump_syms to dump unmangled names by default so that consumers can
demangle them after-the-fact.

It also adds a tiny bit of support for linking against a Rust library I wrote
that can demangle Rust symbols nicely:
https://github.com/luser/rust-demangle-capi

BUG=

Change-Id: I63a425035ebb7ac516f067fed2aa782849ea9604
Reviewed-on: https://chromium-review.googlesource.com/402308
Reviewed-by: Mark Mentovai <mark@chromium.org>
2016-10-25 10:43:00 +00:00
Mike Frysinger
fea963f974 add new dmp file to dist 2016-09-01 12:05:18 -04:00
Ivan Penkov
240ed57ee1 Adding support for overlapping ranges to RangeMap.
When enabled, adding of a new range that overlaps with an existing one can be a successful operation.  The range which ends at the higher address will be shrunk down by moving its start position to a higher address so that it does not overlap anymore.

This change is required to fix http://crbug/611824.  The actual fix will come in a separate CL.

R=mmandlis@chromium.org

Review URL: https://codereview.chromium.org/2029953003 .
2016-06-05 22:41:10 -07:00
Mike Frysinger
983d04d36e travis: verify out-of-tree builds & dist targets
Required updating a lot of dist files in the process.

R=ted.mielczarek@gmail.com

Review URL: https://codereview.chromium.org/1946293002 .
2016-05-25 14:36:37 -04:00
Yunlian Jiang
764c21f752 Add debug fission support.
This added debug fission support.
It tries to find the dwp file from the debug dir /usr/lib/debug/*/debug
and read symbols from them.

Most of this patch comes from
https://critique.corp.google.com/#review/52048295
and some fixes after that.
The elf_reader.cc comes from TOT google code. I just
removed some google dependency.

Current problems from this patch
1: Some type mismatch: from uint8_t * to char *.
2: Some hack to find the .dwp file. (replace .debug with .dwp)

BUG=chromium:604440
R=dehao@google.com, ivanpe@chromium.org

Review URL: https://codereview.chromium.org/1884283002 .
2016-05-04 11:09:44 -07:00
Ted Mielczarek
205b5ac6ed Fix a dependency issue in automake
Doing a `make -jN check` from a fresh build breaks (and has probably been
broken for a while). linux_client_unittest_shlib is missing $(TEST_LIBS)
from its _DEPENDENCIES. The automake manual says if _DEPENDENCIES are not
specified they'll be computed from _LDADD, but we are specifying it and just
leaving out $(TEST_LIBS).

R=vapier@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1870733005 .
2016-04-12 14:55:18 -04:00
Ted Mielczarek
6c8f80aa8b Switch the Linux minidump writer to use MDCVInfoELF for CV data.
This preserves full build ids in minidumps, which are useful for
tracking down the right version of system libraries from Linux
distributions.

The default build id produced by GNU binutils' ld is a 160-bit SHA-1
hash of some parts of the binary, which is exactly 20 bytes:
https://sourceware.org/binutils/docs-2.26/ld/Options.html#index-g_t_002d_002dbuild_002did-292

The bulk of the changes here are to change the signatures of the
FileID methods to use a wasteful_vector instead of raw pointers, since
build ids can be of arbitrary length.

The previous change that added support for this in the processor code
preserved the return value of `Minidump::debug_identifier()` as the
current `GUID+age` treatment for backwards-compatibility, and exposed
the full build id from `Minidump::code_identifier()`, which was
previously stubbed out for Linux dumps. This change keeps the debug ID
in the `dump_syms` output the same to match.

R=mark@chromium.org, thestig@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1688743002 .
2016-04-05 09:34:20 -04:00
Li Yan
c77c51fae6 Refactor sym_upload in tools to extract code into common/linux, and minor fixes
to code calling libcurl. This change may be used to build a tool to dump and
upload symbols with multi-thread.

BUG=

R=mmandlis@chromium.org
CC=google-breakpad-dev@googlegroups.com

Review URL: https://codereview.chromium.org/1842113002 .
2016-03-30 13:46:21 -07:00
Mike Frysinger
358c3b449c linux_dumper_unittest_helper: move to a check-only binary
There's no need for this binary outside of local tests, so stop
building/installing it by default.

BUG=chromium:579384
TEST=`make check` passe
R=ivanpe@chromium.org

Review URL: https://codereview.chromium.org/1632933002 .
2016-02-17 00:48:38 -05:00
Veljko Mihailovic
d7c0bd0624 Fix for linux make check build failure
Linux make check is failing for mips, mips64, arm, arm64
with error:
"fatal error: mach/arm/vm_types.h: No such file or directory" in case of arm,
"../src/third_party/mac_headers/mach/machine/vm_types.h:37:2: error: #error architecture not supported" in case of mips/mips64

This was partially fixed in https://codereview.chromium.org/1645673002/.

Here excluding src/common/mac/macho_reader_unittest for hosts other than x86/x86-64.

BUG=make check failure for linux mips
TEST=make check pass

Review URL: https://codereview.chromium.org/1692933002 .
2016-02-12 15:17:11 -05:00
Mike Frysinger
76c51742c9 [mips64] Support for mips n64
Adding remaining mips n64 support including stackwalker.

BUG=None
TEST=manually tested on Linux/Android
R=vapier@chromium.org

Review URL: https://codereview.chromium.org/1418453011 .
2016-02-06 18:58:39 -05:00
Mike Frysinger
3f736ce086 only build dump_syms_mac for x86 hosts
The dump_syms_mac tool only works for the system it is being built for
(it doesn't support running on ELFs for a diff target), and it builds
only for x86 currently.

If you look at the mac header:
	src/third_party/mac_headers/mach/machine/vm_types.h
it will #error for non x86/arm systems, and the arm header is not in
our source tree.

Tweak the build so it's only compiled when targetting x86 systems.

BUG=chromium:579384
TEST=`make check` pass
R=ted.mielczarek@gmail.com

Review URL: https://codereview.chromium.org/1645673002 .
2016-01-27 16:45:21 -05:00
Mike Frysinger
f820ead901 test: allow use of system gmock/gtest libs
Some systems provide prebuilt copies of gmock/gtest (such as Chromium
OS).  Add a configure flag so they can take advantage of that.  This
allows for a smaller checkout as they don't need to include the full
testing/ tree.

BUG=chromium:579384
TEST=`make check` passes w/--enable-system-test-libs
TEST=`make check` passes w/--disable-system-test-libs
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1638653002 .
2016-01-25 19:27:56 -05:00
Mike Frysinger
4b5dcd0e69 build: clean up .dwo files
When building with -gsplit-dwarf, the generated dwo files are left behind
even when you `make clean`.  Fix that up.

BUG=chromium:579384
TEST=`./configure CXXFLAGS='-O -gsplit-dwarf' && make && make clean` removes dwo files now
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1633893002 .
2016-01-25 18:40:56 -05:00
Mike Frysinger
83523e066b test: stop building tons of copies of gtest/gmock objects
The current makefile ends up building ~17 copies of the gtest/gmock
objects -- every test that refers to the cc files directly will have
its own copy.  This is because the build doesn't know if CFLAGS and
such have changed between each target (and in some cases, they are).

Create a new libtesting.a target to hold a single copy of these files
and update all of the unittests to link that in.  This speeds up the
build a bit especially when you aren't using ccache.

This does mean we can no longer build gtest/gmock with unique flags,
but we haven't wanted that so far, so clearly no one wants that.

BUG=chromium:579384
TEST=`make check` passes
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1633903002 .
2016-01-25 17:41:53 -05:00
Mike Frysinger
e4cf26b851 linux_client_unittest_shlib: fix cleaning
The EXTRA_PROGRAMS knob does not automatically trigger clean up of
targets listed in it.  Use CLEANFILES so we make sure `make clean`
will delete the linux_client_unittest_shlib lib.

BUG=chromium:579384
TEST=`make check` passes
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1618593002 .
2016-01-25 16:53:16 -05:00
Mike Frysinger
92280b3c67 tests: unify duplicate build settings
Rather than copy & paste the same set of -I flags many times over,
create a single varible to hold it.

BUG=chromium:579384
TEST=`make check` passes
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1613763002 .
2016-01-25 15:12:03 -05:00
Mike Frysinger
ac69c577d8 Move core2md objects to libbreakpad_client.a
This CL exports LinuxCoreDumper and ElfCoreDump in the client library. The ARC collector, which is an alternative to core2md optimized for large core dumps, needs these symbols for core dump parsing and conversion to minidump.

BUG=http://b/25773929
TEST=nm src/client/linux/libbreakpad_client.a | grep LinuxCoreDumper

Review URL: https://codereview.chromium.org/1576053002 .
2016-01-13 15:30:21 -05:00
Ted Mielczarek
a22992081f Rename src/tools/mac/dump_syms binary to dump_syms_mac in autotools build to fix make install
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1474673004 .
2015-11-25 14:27:53 -05:00
Mike Frysinger
2d1b97a1ff Don't include libdisasm.a in libbreakpad.a
libbreakpad.a pointlessly contains libdisasm.a

This looks like a left-over from when libtool was used

Since this has no useful effect (as the linker doesn't recursively search
archive members which aren't objects), anything which requires the objects in
libdisasm.a must already be linking with it, so simply remove it.

BUG=https://code.google.com/p/google-breakpad/issues/detail?id=484

Review URL: https://codereview.chromium.org/1399003002 .
2015-11-11 01:17:45 -05:00
Mike Frysinger
ee69060bfd Install headers under client/linux/dump_writer_common
Automake did not install headers under c/l/dwc, which caused
compile errors when building against an installed breakpad, since
other headers (e.g. client/linux/handler/exception_handler.h)
depended on it. This commit adds these headers to the list of
automake installed files.

R=vapier@chromium.org

Review URL: https://codereview.chromium.org/1127393006 .
2015-11-11 01:11:00 -05:00
Primiano Tucci
679d70f50b Fix automake files after README.md -> README rename
Minor followup to crrev.com/1357773004 and
crrev.com/1361993002 which moved the README and forgot
to update the automake files.
This is to make "./configure && make" work.

TBR=mark@chromium.org

Review URL: https://codereview.chromium.org/1368363002 .
2015-09-28 14:02:08 +01:00
Ted Mielczarek
8079ae192d Fix Mac Breakpad host tools to build in Linux cross-compile
We're working on building our Firefox Mac builds as a Linux cross-compile
(https://bugzilla.mozilla.org/show_bug.cgi?id=921040) and we need symbol
dumping to work. This change ports the Mac dump_syms tool to build and work
on Linux. I've tested it and it produces identical output to running the
tool on Mac.

The bulk of the work here was converting src/common/mac/dump_syms.mm and
src/tools/mac/dump_syms/dump_syms_tool.mm from ObjC++ to C++ and removing
their use of Foundation classes in favor of standard C/C++.

This won't compile out-of-the-box on Linux, it requires some Mac system
headers that are not included in this patch. I have those tentatively in
a separate patch to land in Gecko
(http://hg.mozilla.org/users/tmielczarek_mozilla.com/mc/rev/5fb8da23c83c),
but I wasn't sure if you'd be interested in having them in the Breakpad tree.
We could almost certainly pare down the set of headers included there, I
didn't spend too much time trying to minimize them (we primarily just need
the Mach-O structs and a few associated bits).

I just realized that this patch is missing updating the XCode project files
(ugh). I'll fix that up in a bit.

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

Review URL: https://codereview.chromium.org/1340543002 .
2015-09-16 06:46:55 -04:00
primiano@chromium.org
3365fe7986 Remove obsolete seccomp_unwinder for legacy (pre-BPF) sandbox
The PopSeccompStackFrame was introduced to deal with stack frames
originated in the legacy seccomp sandbox. The only user of that
sandbox was Google Chrome, but the legacy sandbox has been
deprecated in 2013 (crrev.com/1290643003) in favor of the new
bpf sandbox.
Removing this dead code as it has some small bound checking bug
which causes occasional crashes in WebView (which are totally
unrelated to the sandbox).

Note: this will require a corresponding change in the chromium
GYP/GN build files to roll.

BUG=665,chromium:477444
R=jln@chromium.org, mark@chromium.org, torne@chromium.org

Review URL: https://codereview.chromium.org/1299593003 .

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1492 4c0a9323-5329-0410-9bdc-e9ce6186880e
2015-08-18 08:38:14 +00:00
ted.mielczarek@gmail.com
591ba326b3 Remove some old unused code, add a missing include
R=lei at https://codereview.chromium.org/1211963002



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1484 4c0a9323-5329-0410-9bdc-e9ce6186880e
2015-08-13 16:38:19 +00:00
Liu.andrew.x@gmail.com
2997f45907 Add support for Linux memory mapping stream and remove ELF header usage
when checking exploitability rating.

Linux minidumps do not support MD_MEMORY_INFO_LIST_STREAM, meaning the
processor cannot retrieve its memory mappings. However, it has its own
stream, MD_LINUX_MAPS, which contains memory mappings specific to Linux
(it contains the contents of /proc/self/maps). This CL allows the minidump
to gather information from the memory mappings for Linux minidumps.

In addition, exploitability rating for Linux dumps now use memory mappings
instead of checking the ELF headers of binaries. The basis for the change
is that checking the ELF headers requires the minidumps to store the memory
from the ELF headers, while the memory mapping data is already present,
meaning the size of a minidump will be unchanged.

As a result, of removing ELF header analysis, two unit tests have been removed.
Arguably, the cases that those unit tests check do not merit a high
exploitability rating and do not warrant a solid conclusion that was given
earlier.

R=ivanpe@chromium.org

Review URL: https://codereview.chromium.org/1251593007

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1476 4c0a9323-5329-0410-9bdc-e9ce6186880e
2015-07-28 00:53:44 +00:00