Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: update handler 2023-10-02 #38

Merged
merged 22 commits into from
Oct 2, 2023
Merged

meta: update handler 2023-10-02 #38

merged 22 commits into from
Oct 2, 2023

Conversation

supervacuus
Copy link
Collaborator

No description provided.

thomasgales and others added 22 commits May 5, 2023 01:13
dump_syms was using x0...x31 notation, while the rest of Breakpad was
using the ABI names. This mismatch was causing stackwalking to not fully
succeed.

Fixed: 1432426
Change-Id: I0713e76e65ff6dad492b51bc3607e94e25dc2c3a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4505156
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Change 4505156 changed the RISCV register names, this change adjusts
the unittest to match the new names.

Bug: 1432426
Change-Id: I0887d8fc11eec63ab6953ea1a136873591e49286
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4507066
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This adds a new flag `enable_objdump_for_exploitability_` to the
MinidumpProcessor, which allows enabling objdump separately for crash
address fixups and for exploitability analysis, as the performance cost
of the exploitability analysis is significantly higher.

Change-Id: I667ffdce7cc0a970793f91413c3d2e3af93f4247
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4507067
Reviewed-by: Ivan Penkov <ivanpe@google.com>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
- Replace DISALLOW_COPY_AND_ASSIGN with =delete.
- Replace some NULLs with nullptrs;
- Use the override keyword when appropriate.
- Use =default when appropriate.

Change-Id: I99e1d7f349dd4c32aa5d05e2ebdce7a86e47f551
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4527718
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
macOS caps filenames at 255 characters. When upload_system_symbols runs
`dump_syms`, the resulting filename is based on a mangled version of
the file's full path. In some circumstances (for example, the dumped
file itself lives in a temp directory), this name can exceed the max.

This change replaces the current mangling by mapping each path component but the last to its first initial, greatly shortening
the resulting filename.

Bug: 1400770
Change-Id: I68203a98eda2912893c5d8f7c676faee17e39e91
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4519231
Reviewed-by: Robert Sesek <rsesek@chromium.org>
It fixes following two problems:
1. When we have skeleton compilation unit (DW_TAG_skeleton_unit) in a
binary file refers to the complete unit in a split dwarf file
(.dwo/.dwp file), we should use the split dwarf file's path in warning
reporting. Right now, it uses the original file (binary file) path in
warning report, which is incorrect.

For example, if we have chrome.debug which is the binary with skeleton
debug info and chrome.dwp which is the complete debug info and the debug
info in chrome.dwp has some incorrect reference, it will warn on
chrome.debug rather than chrome.dwp

2. When split dwarf is enabled, the global inline_origin_map will likely
encounter key collision because the offsets as keys are now relative to
each CU's offset which is relative to .debug_info section. Also
offsets from different files might collide.

This change makes a inline_origin_map for each debug file and use
offsets only relative to .debug_info section as keys.

Bug: b/280290608
Change-Id: If70e2e1bfcbeeeef2d425c918796d351a0e9ab3b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4544694
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Test: arm softfp build, crashed program intentionally with kill -4 and
observed successful minidump generation.
Bug: b/283473162
Change-Id: Id71f92653ced04575ffbb87e309d4139ca34d843
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4545508
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
- RISCV32 will only include support for 32 bit floating point registers
- RISCV64 will only include support for 64 bit floating point registers
- RISCV 32/64 context will include a "version" field to account for
  future extensions

Fixed: 1447862

Tested: `make check` on x86 host
Tested: `minidump_stackwalk` for RISCV64 minidump on x86 host
Change-Id: I605d5b2c35e627a5dc986aaf818a9c9898f6ae0b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4553281
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Change-Id: I30fab42e2a1e7d0abf970b825e66a0db8b6a0fd5
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4557444
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Bug: b/280290608, chromium:1448979
Change-Id: I3f9e4c3d62b4c858238ccbbda0366926c306e27f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4568824
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
The hex formatting in MinidumpCrashpadInfo::Print() was missing
the leading 0, so byte values < 128 were not possible to decode.

Change-Id: Ib355bcdaf86e91d644045df645fb4fa75332aa4b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4571100
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
…file.

The debug info in the dwp file needs to refer to the .debug_line and
.debug_line_str sections in the main binary.

This fixes dump_syms not generating LINE records for dwp in split dwarf.

Bug: chromium:1448979
Change-Id: I71923f12cea72caae081c1406e2cbca55e95859e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4576346
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Bug: chromium:1448979
Change-Id: Ib174ab1592d189e0f05e6baa6a96af2742d00eda
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4580929
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Fix warnings on Ubuntu 22.04

Change-Id: I2f64988706e72838b4e2cec50d0bde9eb90929ad
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4668734
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Support for zstd must be enabled by passing --enable-zstd to configure.

Change-Id: I57d0196552284de86575d979d673ac20a3fc4d64
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4722191
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
The _tmp buffer used in STRNCATF is too small for several callers,
which might lead to truncated output in some situations.

For example, GCC 11 warns:

src/third_party/libdisasm/x86_format.c:899:40: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
  899 |                         STRNCATF( buf, "%s:", str, len );
      |                                        ^~~~~  ~~~
src/third_party/libdisasm/x86_format.c:34:38: note: in definition of macro ‘STRNCATF’
   34 |         snprintf( _tmp, sizeof _tmp, fmt, data );   \
      |                                      ^~~
src/third_party/libdisasm/x86_format.c:899:41: note: format string is defined here
  899 |                         STRNCATF( buf, "%s:", str, len );
      |                                         ^~
In file included from /usr/include/stdio.h:894,
                 from src/third_party/libdisasm/x86_format.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 2 and 65 bytes into a destination of size 32
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~

Change-Id: Ia876e288bf9629f2c72db3faf2287c7940924ea0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4668735
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Functions such as FindElfSection and FindElfSegments that inspect
the ELF header expect a pointer to the first byte of the file.
IsValidElf() checks for the ELF magic number at offset 0.
Thus, we must map ELF object files from offset 0.

Change-Id: Icebfb46229a04019f57a7ec07844257b98ceb278
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4674337
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Bug: chromium:1137393
Change-Id: I1a6a5f2013e6a08e189958b89415183ffb6fe345
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4722972
Reviewed-by: Mark Mentovai <mark@chromium.org>
Python 2 is deprecated and have now been removed from CI builders.

Change-Id: Ic838714502e16136bd8ed345a47a00b71ff889aa
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4754416
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Change-Id: I400130d67acea47158b9ba4f5703c7e9bc2cbb79
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4811217
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
… (StackFrame) to derived-class (StackFrameARM64).

Inline frames are always of the base-class type (StackFrame). Treating them as derived-class and accessing members is causing buffer overflows.

Change-Id: Ib41b74256e6162e7d2b14ca3905dfaf5591b9c86
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4847317
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
@supervacuus supervacuus merged commit b99f444 into handler Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet