| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3e56ef9d changed dump_syms to set the module name from DT_SONAME
expecting that clients were already using DT_SONAME when it was
present. The Breakpad client previously only used DT_SONAME as the name
for a module if it detected that it was likely mapped from a zip file.
This patch updates the Breakpad Linux client to always use the
DT_SONAME in minidumps if it's present.
Also included are changes to address comments that were missed from
that review.
Bug: 1016924
Change-Id: I4aae8c05e6793d4b0598049a8964ddd4cb0c6194
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1889231
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the following consistent within the file:
- 0x...ULL for unsigned literals.
- On pointers, put the asterisk with the type.
Context: Made a previous change and saw a mix of styles. Make it
consistent for the sake of visual consistency.
Bug: None
Change-Id: I0f80aedc0ca0295be3c70bd88822cbb82d0415ba
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1888434
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partitioned libraries generated with lld and llvm-objcopy currently
contain a superset of debug information, beyond what applies to the
library itself. This is because objcopy cannot split up debug
information by partition - instead, it places a copy of all debug
information into each partition.
In lieu of potential future support for lld or objcopy becoming able to
split up debug information, let dump_syms do the next best thing:
- Find the address ranges of all PT_LOAD segments in the lib.
- Supply these to the Module being generated.
- Filter additions to the Module based on these ranges.
Bug: 990190
Change-Id: Ib5f279f42e3f6ea79eed9665efbcc23c3c5d25dc
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1884699
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
|
|
|
|
|
|
|
|
|
| |
This allows Fuchsia to use dump_syms directly without a
postprocessing step.
Change-Id: I84507f8bedddfcdcdb237119457c8ddf8ac354d5
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1850718
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Breakpad and Crashpad clients will use an object's DT_SONAME as
the name for a module if it exists. Previously, linux dump_syms would
assume the basename of an input elf file matches that value, causing
symbol lookups to fail if they were mismatched. This patch updates
dump_syms to use DT_SONAME as the module name, if present.
Bug: 1016924
Change-Id: I5eff0cf06c703841df3fb552cb5a8e1e50a20c64
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1876763
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Leave it to the user to decide how to manage their local tree state.
Bug: 993518
Change-Id: Ic026f9bdc11e1a16f91da74f1b173753c6efa88c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1753593
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
"register" as a storage class specifier has been deprecated since C++11,
and has been removed from C++17 while remaining a reserved word. See
C++17 5.11 and C.4.3.
Change-Id: I2dbab8a7061cb680d902644d39ea1a7fbc930e5c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1749329
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A .dSYM may validly contain a __DWARF segment without any __debug_info
section. This can occur for Chromium Framework in a component build of
Chromium, because in that case, all of the code is in other libraries
that Chromium Framework depends on.
This was previously tested by an assertion, but the assertion did not
trigger in NDEBUG (release) builds. In NDEBUG builds, this condition
would lead to an out-of-bounds read, detected by AddressSanitizer.
Instead of an assertion, the check is now always done at runtime.
Instead of being fatal, it's now just a warning, because it's been
established that __DWARF without __debug_info can occur.
(In the Chromium case, it remains pointless to run dump_syms via the
"chrome_dump_syms" target on a component build, as it'll only attempt to
symbolize Chromium Framework, and not any of the libraries that Chromium
Framework depends on that actually contain the code.)
Bug: chromium:991206
Change-Id: I6c9c75f0be7901813e3eaae54aff38c1afe73ca9
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1741610
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Bug: google-breakpad:779
Change-Id: If0cfb036ee924178033c89d4dc3e2ce75ddd46f2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1732887
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
| |
Bug: google-breakpad:787
Change-Id: I9f7144b3456abb750142eae9f989133bf4f27885
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1734586
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
| |
Bug: https://bugs.chromium.org/p/google-breakpad/issues/detail?id=795
Change-Id: I1494c1d2493616b6b263111137ef7aceeb31be44
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1733536
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointer authentication codes are used to validate pointers against
accidental or malicious modification by storing a hash of the address
and a secret value in the pointer's unused, upper bits. The exact
bits used may vary by implementation and depend on the size of the
virtual address space of the target system, and whether other tagged
pointer features are in use.
Apple has implemented PACs in the Apple A12.
https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication
The documented method of stripping PACs from a pointer is to call
ptrauth_strip(), which ultimately emits an `xpaci` instruction, but
this option isn't available to the Breakpad processor not running on
the device. Instead, this patch selects likely address bits from
link register values by examining the address range of loaded modules.
Change-Id: I054bd1a03605719937fc85dcc8d8b9fe927f44be
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1713650
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
| |
Now decoding the OS name and exception codes for Fuchsia. Still not decoding exception flags (can be added later, if needed).
Change-Id: If66cb000828be18f0c1b35d1b1f52b3ca3e1fd67
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1699049
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This is deprecated in the downstream consumer that it was introduced to
support.
This undoes b41ad66e93562.
Change-Id: I3e0fa068b134014700128d1d75cae6a20d591d12
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1687125
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
| |
- I think I previously fixed this for dump_syms, but must have missed
the symupload one because it didn't have a gn target.
Change-Id: Ibf4daa0dc874f329c2ee7c7b3d4de1ee6bc68d13
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1682717
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This is a workaround to an issue with gn/clang build of Windows
symbol converter where dbghelp.dll is loaded from system32/syswow64
instead of alongside the process exe.
- Why do we care where dbghelp.dll is loaded from? Two considerations:
1. dbghelp.dll will only load symsrv.dll from the directory where it
resides.
2. symsrv.dll requires a file called "symsrv.yes" to be in the
directory where it resides in order to work with MS symbol stores.
Therefore if we load dbghelp.dll from syswow64, then we must also
ensure there is a symsrv.dll and symsrv.yes file in syswow64.
Change-Id: Ia283a2c11e276c855a48157aa7be77897af4b02e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1680670
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
| |
Change-Id: Ib7f6e37af1466b5bed3e7d2921e0d9774394ad1e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1680056
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
| |
- Was attempting "full match" when we meant to do "partial match".
Change-Id: Ia748a7fc8707e11f44c205e57f218f5f4bbc5612
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1676936
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
| |
- Put FileHeaderMachineToCpuString definition in header.
- Remove extra semi-colon.
Change-Id: I726ad0f73c57908576414fd828052dff09f5c51f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1673142
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
| |
- Was broken by a rename in http upload util code.
Change-Id: I72c275fe45638c83e535901e79817893b00ee62e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1673138
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Only 64-bit PEs supported.
- Re-add some scripts that were missed in initial move of code.
- Change msdia120.dll dependency to msdia140.dll.
- Add tests for Intel, AMD, and NVidia Microsoft Symbol Stores.
- Windows symbol converter now attempts to fall back to PE-only metadata
when it fails to locate a PDB.
- Remove the 'binary' folder under converter_exe. Need to think more
about how a deployment should look and what tool(s) to use in creating
one.
Change-Id: I52e42cbe5e759874a25114c2483e8b50d73fdf77
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1670098
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
- Add a #define to testing.gyp to avoid warnings about TR1 deprecation.
- PESourceLineWriter now reads debug_file from CodeView record instead
of using code_file value.
- Updated PE-only MD reading unit test.
Change-Id: Ib4e6201df3e3fd651e160f310584b5a67b16c842
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1668347
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
| |
Change-Id: Ib6d3359f6a8ad7e0d2c2d6a4e92af37bc451db28
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1666353
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
| |
- Rename two files from '.cpp' to '.cc' and insert missing comma in
between lines in source files list.
Change-Id: I169a738b565f52292cb0292b34c4397e9dc05370
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1666351
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
- First step, this is just enough to get it generating a msbuild
project with GYP, which in turn can build the executable.
- Tests need to be redesigned because there isn't an available server.
Change-Id: I45440fd32b3ede29666c127703bcd441f0e4288e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1661134
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
| |
/Library/QuickTime is gone in 10.15b2 19A487l.
Change-Id: I927350a9cb383b93e8b18aef5f36c77bb67fede1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1663996
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
|
|
|
|
| |
Change-Id: I5623da3109feeb4b80137fa67501b8fd7aa5c8ec
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1663995
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upstream googletest is dropping autotools support and the cmake
installer does not provide gtest-config.
BUG=chromium:940320
TEST=FEATURES=test emerge-lakitu google-breakpad
Change-Id: Icd51ffc48b39c24eebc27cc023e74a77e592de3e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1660893
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implement in common_windows_lib-- added class "PESourceLineWriter".
- Add command-line switch to tell dump_syms to use PESourceLineWriter.
Symbol data created this way will contain information to correlate the
module with ones found in minidumps, along with frame info that allows
much higher quality stack-walking in those minidumps.
- Significant refactor of PDBSourceLineWriter-- all code concerned with
extracting metadata from PE files has been moved into utility
functions. This is to allow sharing of this functionality with newly-
added PESourceLineWriter.
- Added a unit test to dump_syms for the PE-only scenario.
Change-Id: If0855f05d424d32d23f484995be5f34232179a37
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1525325
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
|
|
|
| |
- CL for Linux change, including new documentation for API, at:
https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1422400/3
Change-Id: I579744fec74c64757b8bc31de63d7a07ef9a0f1f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1487982
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|
|
|
|
|
|
| |
Change-Id: I2ada9f96efe97c25c885eef561af725418a46bec
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1652667
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
| |
Change-Id: I9e745d2a4b3f780941ba286bbafa5d4169d172f7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1653863
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Fixes errors for comparisons between signed and unsigned ints.
Change-Id: I7ef151ba84a48a0c8cc449cfaf12b9fef775d5a7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1642361
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated the minimal target version from 10.5 to 10.7.
* Reference for the similar issue:
https://github.com/uglide/RedisDesktopManager/issues/4284
Fix provided by Hiroyuki Komatsu.
Change-Id: Ie08f8f6084e66d439d8b6282f1f4734b2dfe778f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1633390
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The path NSCachesDirectory may change across app updates and sometimes
even across app launches. As a result, the Config-XXX files may end up
with an outdated path to the associated minidump file.
Change-Id: I0befde26b2ac406c154ce7c7e9be0063ee99892d
Bug:850379
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1592561
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This, hopefully, will reduce occurrences of UnfinishedReportUploads. It
will not eliminate it completely because uploads are never retried if
they fail.
60s is actually the default value. Before iOS6, 240s was the default and
minimum applied to requests with a body. Reference:
https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414063-timeoutinterval?language=objc
Bug:850379
Change-Id: I2f16fda7d7e8cbb8b8a6fc917111d9f646fbdad0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1609876
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests were failing because they had expectations about the number
of threads in a process, but TSan, and in some cases, ASan, introduce
their own threads. Where a sanitizer affects this, the expectations are
now used as minimum thread counts, not exact thread counts. See
https://www.brooklinen.com/blogs/brookliving/best-thread-count-for-sheets.
These problems were detected by ThreadSanitizer at
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8915151099544583616/+/steps/breakpad_unittests__with_patch_/0/stdout
Bug: chromium:949098
Change-Id: Ie40f1766bea27e9bcb112bf9e0b8b846fb343012
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1585948
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One form of google_breakpad::WriteMinidump() passed MappingList and
AppMemoryList objects by reference to a MinidumpWriter object,
instantiating them directly as constructor parameters. The
MinidumpWriter stored these objects internally as references, and the
underlying objects went out of scope after MinidumpWriter construction.
The MinidumpWriter outlived them, causing a violation on any attempt to
access them following construction.
This bug was detected by AddressSanitizer at
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8915150848087289472/+/steps/breakpad_unittests__with_patch_/0/stdout
Bug: chromium:949098
Change-Id: I072ea9f1b64e1eae3e89d4a2b158764ff7970db5
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1585946
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a result callback on report upload completion.
On failure, Breakpad deletes the configuration file and does retry to
upload a report.
Using this callback, the client will be able to log some metrics and to
act on upload failure.
Bug: 954175
Change-Id: I95a3264b65d4c06ba5d8dde8377440d23f1e2081
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1572661
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chrome's test runner on Linux installs its own StackDumpSignalHandler
which swallows signals and doesn't re-raise them. This is sloppy, but
apparently there are reasons (https://crbug.com/551681). For
breakpad_unittests, it causes problems where a test process expects (via
waitpid()) to observe a child crash. Deal with those cases by
explicitly restoring the default signal handler.
In another case, Chrome's test runner seems to have been arriving at the
conclusion that it was to expect output from a child. Transitioning from
exit() to _exit() fixes this problem, and it's not necessarily a bad
idea to do this in post-fork() children without an execve() anyway.
Bug: chromium:949098
Change-Id: I5a6af0c2a09cd8eac9998358f6d5ea665288236f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1575670
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
| |
This makes it build again for Xcode 10.
Change-Id: Ia28b8c0b131ac2862a8c17e223d1d7b1f0f59134
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1574177
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The [ OK ] LinuxCoreDumperTest.VerifyExceptionDetails line does
not appear at the beginning of a line, hiding it from Chromium’s test
infrastructure. This causes the test to have an unknown result, which is
treated as a failure.
https://ci.chromium.org/p/chromium/builders/try/android-kitkat-arm-rel/233129
Bug: google-breakpad:791
Change-Id: I0eb646a219fa40347db884fd28ace647328c5e49
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1558893
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running this test on android-kitkat-arm-rel fails for some reason:
[ RUN ] LinuxCoreDumperTest.VerifyExceptionDetails
linux_core_dumper_unittest.cc:170: Failure
Expected: (0U) != (dumper.crash_address()), actual: 0 vs 0
linux_core_dumper_unittest.cc:178: Failure
Expected equality of these values:
2U
Which is: 2
info.size()
Which is: 0
[ FAILED ] LinuxCoreDumperTest.VerifyExceptionDetails (7 ms)
Disable it for now on Android until someone can look into it.
Bug: google-breakpad:791
Change-Id: I40a5e3dbeeb44e5eb0df187e61d55e07d8ad3613
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1546778
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
| |
Bug: chromium:940823, chromium:946404
Change-Id: Ib8af7f0845b0488f36cd1b91326aba11bf283b0a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1546779
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the fields we save might have signed types depending on the
system (e.g. `typedef int pid_t`). Depending on the toolchain, we
can trip -Werror=narrowing failures like:
src/client/linux/minidump_writer/linux_core_dumper.cc:248:66: error:
narrowing conversion of ‘(__pid_t)info->siginfo_t::_sifields.siginfo_t::<anonymous union>::_kill.siginfo_t::<anonymous union>::<anonymous struct>::si_pid’
from ‘__pid_t {aka int}’ to ‘long unsigned int’ inside { } [-Werror=narrowing]
set_crash_exception_info({info->si_pid, info->si_uid});
^^^^^^
src/client/linux/minidump_writer/linux_core_dumper.cc:252:71: error:
narrowing conversion of ‘(int)info->siginfo_t::_sifields.siginfo_t::<anonymous union>::_sigsys.siginfo_t::<anonymous union>::<anonymous struct>::_syscall’
from ‘int’ to ‘long unsigned int’ inside { } [-Werror=narrowing]
set_crash_exception_info({info->si_syscall, info->si_arch});
^^^^^^^^^^
Since the exception info fields are all uint64_t which should be large
enough to handle all the fields in the siginfo_t structure, add casts
for all the assignments to avoid these errors. We have implicit casts
even without them, so we aren't changing behavior.
Bug: google-breakpad:791
Bug: chromium:945653
Change-Id: Ib04e015998f08b857159ac13e9a065a66d228d49
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1544862
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even 64-bit Mach-O (MH_MAGIC_64 = 0xfeedfacf) is not a fully 64-bit file
format. File offsets in sections are stored in 32-bit fields, with
Mach-O writers typically truncating offsets too large to fit to just
their low 32 bits. When a section begins at a file offset >= 4GB,
dump_syms would produce an error such as:
Google Chrome Framework.dSYM/Contents/Resources/DWARF/Google Chrome Framework: the section '__apple_names' in segment '__DWARF' claims its contents lie outside the segment's contents
As a workaround, this implements the strategy I first described in
https://crbug.com/940823#c22.
Segment file offsets are stored in 64-bit fields. Because segments
contain sections and must load contiguously, it’s possible to infer a
section’s actual offset by computing its load address relative to its
containing segment’s load address, and treating this as an offset into
the containing segment’s file offset. For safety, this is only done for
64-bit segments (LC_SEGMENT_64) where the 32-bit section offset stored
in the Mach-O file is equal to the low (truncated) 32 bits of the
section offset recomputed per the above strategy.
Beware that this does not provide full “large file” support for 64-bit
Mach-O files. There are other file offsets within Mach-O files aside
from section file offsets that are stored in 32-bit fields even in the
64-bit format, including offsets to symbol table data (LC_SYMTAB and
LC_DYSYMTAB). No attempt is made to recover correct file offsets for
such data because, at present, such data is always stored by dsymutil
near the beginning of .dSYM files, within the first 4GB. If it becomes
necessary to address these other offsets, it should be possible to
recover these offsets by reference to the __LINKEDIT segment that
normally contains them, provided that __LINKEDIT doesn’t span more than
4GB, according to the strategy discussed at the bottom of
https://crbug.com/940823#c22.
Although this is sufficient to allow dump_syms to interpret Chromium
.dSYM files that exceed 4GB, be warned that these Mach-O files are still
technically malformed, and most other tools that consume Mach-O files
will continue to have difficulties interpreting these large files.
As further warning, note that should any individual DWARF section exceed
4GB, internal section offsets will be truncated irrecoverably, unless
and until the toolchain implements support for DWARF64.
https://bugs.llvm.org/show_bug.cgi?id=14969
With this change, dump_syms is able to correctly recover file offsets
from and continue processing a .dSYM file with length 4530593528
(4321MB), whose largest section (__DWARF,__debug_info = .debug_info) has
size 0x8d64c0b8 (2262MB), and which contains four sections (starting
with __DWARF,__apple_names) beginning at file offsets >= 4GB.
Bug: chromium:940823, chromium:946404
Change-Id: I23f5f3b07773fa2f010204d5bb53b6fb1d4926f7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1541830
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Baselines appeared to be stale. dump_syms now prints FUNC entries
with the full function signature, whereas the baselines only
contained the function name. The current state of the symbol file
docs
(https://chromium.googlesource.com/breakpad/breakpad/+/refs/heads/master/docs/symbol_files.md)
seem to agree with the new FUNC entries rather than the old ones.
Example of a name given in current docs:
"nsQueryInterfaceWithError::operator()(nsID const&, void**) const".
Change-Id: I9e01354cd82b7184b7cba31d132603e949a657ac
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1529133
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
|