2451 Commits

Author SHA1 Message Date
prabhukr
04b11f9964 Remove nullptr initialization of std::string
The Fuchsia test file has a zero initialization of std::string which is
causing build failures in Fuchsia with the latest Clang toolchain.

Bug: chromium:401365559
Change-Id: I37dee7c87f6c90e53fccbd2f03241143e40a77cb
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6331160
Commit-Queue: Roland McGrath <mcgrathr@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Roland McGrath <mcgrathr@chromium.org>
Commit-Queue: Prabhu Karthikeyan Rajasekaran <prabhukr@google.com>
2025-03-06 16:55:31 -08:00
Mark Mentovai
e383fa1d04 .gitignore third_party/windows/clang/win-amd64
third_party/windows/clang/win-amd64 was added to DEPS in d7aeda9fca8b2
(https://chromium-review.googlesource.com/c/6242577, 2025-02-24) without
a corresponding .gitignore entry. This adds the missing entry so that
properly `gclient sync`ed trees don’t appear dirty on Windows.

Bug: 384682775
Change-Id: I5d1ec54f20d9e1464cd832fa4b0a3ac54e114c6f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6310239
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-27 13:05:56 -08:00
Mark Mentovai
8eb8015544 Fix capture_context_win_arm64 in standalone clang build
clang-cl does not understand armasm64 assembler syntax. The existing
workaround for crashpad_is_in_chromium, which has used clang-cl
exclusively for quite some time, was to use a checked-in prebuilt .obj
produced by armasm64, rather than assembling the .asm during the build.
This same .obj can be used to support the standalone clang build.

As Crashpad on Windows is now clang-primary (with an eye toward becoming
clang-only), this is not a long-term solution. The existing armasm64
source will need to be translated to an assembler dialect that clang-cl
understands.

Bug: 399587142, 384682775
Change-Id: Ieeb3c1c54c954997514a3fecb5c362b7d4d7d13d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6309923
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-27 13:05:53 -08:00
Mark Mentovai
32a2c250a3 zlib: don’t define __clang__ for win-arm64 with MSVC
Defining __clang__ when MSVC was used to build zlib was added in
761c6fe8be0e (https://chromium-review.googlesource.com/c/1347773,
2018-12-12) to overcome a problem where the non-clang codepath normally
used by MSVC contained SSE4.2 (x86-specific) intrinsics.

Since zlib in Chromium 9d4ec9349a1b
(https://chromium-review.googlesource.com/c/1960893, 2019-12-12—exactly
one year later!), zlib changed and the __clang__ workaround was no
longer necessary, but evidently not harmful, either.

At some point, the Windows SDK improved its clang compatibility, and its
headers gained some macros to disable clang warnings when being built
with clang. <ucrt/corecrt.h> offers _UCRT_DISABLE_CLANG_WARNINGS, which
expands to _Pragma("clang diagnostic push") and similar when clang is in
use, determined by __clang__ being defined. MSVC doesn’t understand
these pragmas, and raises warning C4068 (unknown pragma), which causes a
build failure when warnings are treated as errors.
_UCRT_DISABLE_CLANG_WARNINGS was used in many headers easily seen by
zlib, such as <stdlib.h>.

Because the __clang__ workaround is no longer necessary, was always
wrong, and since MSVC can now build zlib for win-arm64 without it, just
remove it.

Bug: 42310164, 399670190
Change-Id: I9c0a811db5cf5a623f2988f13c8216e16cc56168
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6309922
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-27 13:05:50 -08:00
Mark Mentovai
a47010323c Update mini_chromium to af17e4df94cfff4b6fa9f0be3eb222828b7cbce6
af17e4df94cf Fix win-arm64 MSVC builds, and maybe other builds

Bug: 399577698
Change-Id: Ibf213e17a7aea887b28c75fa804a888b870e6234
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6310238
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
2025-02-27 13:05:47 -08:00
Mark Mentovai
7d350d7e10 Remove BUG_PREFIX from codereview.settings
BUG_PREFIX was useful when Crashpad bugs were in a separate bug database
namespace from Chromium bugs, as was the case when both projects were
using Monorail. With both now using Buganizer, there is no longer any
need to use the crashpad: prefix for Crashpad bugs. Tools will
automatically link bug numbers in this field and the links will refer to
the correct bug regardless of whether it’s filed under Crashpad,
Chromium, or another project.

Change-Id: I80afac17946419aa70b462c3c1c98183f3ab4310
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6310117
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-27 12:08:10 -08:00
Mark Mentovai
29dc41f7eb Update mini_chromium to aa56c39732fe3056cc342e59f1a5563ed6ba5e5e
cb60252b4173 Run clang arm64 asm under env wrapper
107106fe36f6 Reformat all Python scripts according to Google style
aa56c39732fe win_helper: invoke vswhere with -products * to work with VS
             Build Tools

Bug: 384682775
Change-Id: I8d16b6ced5a659963d89651350c50353db38a2d7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6306031
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-26 14:02:50 -08:00
Mark Mentovai
51eba29eee Fix Python 3.13 re DeprecationWarning: pass count and flags by keyword
https://docs.python.org/3/library/re.html:
> Deprecated since version 3.13: Passing count and flags as positional
> arguments is deprecated. In future Python versions they will be
> keyword-only parameters.

https://github.com/python/cpython/issues/56166,
https://github.com/python/cpython/pull/107778,
https://docs.python.org/3/whatsnew/3.13.html#:~:text=gh%2D66543.)-,re%3A,-Deprecate%20passing%20the

Change-Id: Ibda1394927062dd9e0353e2b9d643b510070deb6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298792
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-25 08:23:52 -08:00
Georg Neis
4d14c1be03 Simplify ChromeOS build configuration
Lacros is no longer supported.

- Remove any IS_CHROMEOS_LACROS uses.
- Replace any IS_CHROMEOS_ASH uses with IS_CHROMEOS.
- Remove dependencies on build/chromeos_buildflags.h.

Change-Id: Ia8b522a14370f2309f2e66eee505cabbf2c95542
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6275984
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2025-02-24 18:02:37 -08:00
Mark Mentovai
0945d59629 Update cpp-httplib to 71ba7e7b1b32 (0.19.0 + 22 commits)
71ba7e7b1b32 Fix #2068 (#2080)
ebe7efa1cce4 Parallelize testing with/without SSL on Windows & set
             concurrency group (#2079)
22d90c29b47c Remove `select()` and use `poll()` (#2078)
b944f942ee84 Correct default thread pool size in README.md (#2077)
550f728165f5 Refactor streams: rename is_* to wait_* for clarity (#2069)
a4b2c61a65f4 Max timeout test refactoring (#2071)
5c0135fa5d7e Fix typo in meson.build (#2070)
2b5d1eea8d7e build(meson): automatically use poll or select as needed
             (#2067)
d274c0abe577 Fix typo
dda2e007a02e Fixed documentation about Unix Domain Sockt (#2066)
321a86d9f2b1 Add *.dSYM to Makefile clean
ada97046a23d Fix misspelled words
6e73a63153e9 Make poll() the default (#2065)
cdc223019acf server_certificate_verifier extended to reuse built-in
             verifier (#2064)
574f5ce93e02 Add style check to workflow (#2062)
2996cecee0a9 Fix code inconsistently formatted and re-format (#2063)
32bf5c9c09ea Simplify SSL shutdown (#2059)
735e5930eb36 Detect additional CMake build failures (#2058)
748f47b3772d Add workflow_dispatch with Google Test filter and OS
             selection (#2056)
4cb8ff9f9053 Print timeout exceedance in MaxTimeoutTest (#2060)
985cd9f6a288 Fix compilation failures with include <windows.h> (#2057)
233f0fb1b8f5 Refactor setting socket options (#2053)
03cf43ebaa55 Release v0.19.0
3c4b96024f6d Don't run CI twice (on push AND pull request)
d74e4a7c9c62 Removed incomplete API compatibility check scripts
bfa2f735f290 ci: add abidiff workflow (#2054)
b6ab8435d792 Improve ABI check tool on macOS
39a64fb4e7e4 Fix ABI compatibility tool on macOS
d7c14b6f3a58 Add API compatibility check tool
1880693aefa4 Dropped Visual Studio 2015 support
dd2034282571 Don't run CI twice (on push AND pull request) (#2049)
a268d65c4f84 Fix check for URI length to prevent incorrect HTTP 414
             errors (#2046)
b397c768e414 Unify select_read() and select_write() (#2047)
8e22a7676a7a Remome 'global timeout' to 'max timeout'
8a7c536ad5b2 Fix #2034 (#2048)
8aad481c6993 Fix test.yaml problem
5814e121dfb5 Release v0.18.7
7adbccbaf71c Refine when content is expected (#2044)
eb10c22db109 Add unit test for #609
708f860e3ab6 Fix #2042
eb30f15363fd Release v0.18.6
4941d5b56b7e Fix #2033 (#2039)
9bbb4741b4f7 Run clang-format (#2037)
282f2feb7708 Add a unit test
60a1f00618a4 Support building httplib.h on OpenVMS x86 systems (#2031)
9104054ca56a Fix README example
d69f144a9991 Update httplib.h (#2030)
929dfbd34850 Update copyright year
3047183fd97d Update README
ef5e4044f13b Update README
37798003220c Release v0.18.5
986a20fb7d36 Resolve #2017 (#2022)
8311e1105fde Fix Windows build problem
ba6845925d44 Fix #2014
343a0fc07330 Fix #2011
54f8a4d0f34a Release v0.18.4
9c36aae4b73e Fix HTTP Response Splitting Vulnerability
b766025a8382 clangformat
9b5f76f8337d Fix #2012
d647f484a48a fix:set_file_content with range request return 416. (#2010)
8794792baa1b Treat out-of-range last_pos as the end of the content
             (#2009)
b85768c1f34f Fix #2005
e6d71bd702d4 Add a unit test for Issue #2004
258992a160e3 Changed to use non-blocking socket in
             is_ssl_peer_could_be_closed
a7bc00e3307f Release v0.18.3
11a40584e992 Fix #1998
3e86bdb4d81c Fix #1997 (#2001)
c817d6569501 Fix casting uint64_t to size_t for 32-bit builds (#1999)
51dee793fec2 Release v0.18.2
457fc4306e70 Fix #1993
4f5b003e760b Fix #1992
5421e2710608 Fix a compiler warning
fe07660f40c3 Fix #1986 (#1988)
da2f9e476ee3 Fix #1985 (#1989)
1a7a7ed1c301 test: Don't check for the exact size of compressed content.
             (#1984)
413994912d19 Update vcxproj files
01dcf1d0adb0 Fix #1969 (without unnecessary sleep_for) (#1982)
8e378779c247 Update README
970b52897c8f Fix #1980
412ba04d1933 Fix problem caused by #1975
bfef4b3e9b48 Fix #1975
7bd316f3d0a6 Fix #1977
26208363eee8 Fix warning
b1b4bb885039 clangformat
9dd565b6e37c Resolve #1973 (#1976)
924f214303b8 Added unit test for exception handler
5c1a34e76681 Release v0.18.1
fa90d06dd5da Merge branch 'master' of github.com:yhirose/cpp-httplib
d869054318d2 Allow empty header values (#1965)
370119503366 Merge branch 'master' of github.com:yhirose/cpp-httplib
d79633ff52c2 clangformat

Bug: 398273506
Change-Id: I18c77e82fbc73d861ac8f61ad85d6070bbb753fd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298937
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-02-24 16:39:41 -08:00
Justin Cohen
e2acb9f332 Fix iOS test when run on arm64 under x86_64 translation
Checking for GenuineIntel will fail under translation mode.

Bug: 398836269
Change-Id: Ib431d16db010d17ed74820b8baf1f6de2652e1f9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6299753
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-02-24 14:47:55 -08:00
Nico Weber
73b3e4f258 Enable clang by default on Windows
Roll crashpad/third_party/mini_chromium/mini_chromium/ 08d490553..a7df8840e (1 commit)

08d490553b..a7df8840eb

$ git log 08d490553..a7df8840e --date=short --no-merges --format='%ad %ae %s'
2025-02-24 thakis Enable clang by default on Windows

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: 384682775
Change-Id: I454ad33b168c0b999664c55ac30ce19e7f4c4072
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298935
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-02-24 14:00:43 -08:00
Nico Weber
d7aeda9fca Prepare for building with clang
* Switch to Chromium's clang package on Windows. Fuchsia's clang
  package uses symlinks, which don't Just Work. See comment 3
  on the linked bug for details.

* Also tweak the installed path of the clang package to use
  win-amd64 instead of windows-amd64 to match gn's host_os
  variable, which is needed by the mini_chromium change in the
  roll mentioned below.

* Add `__declspec(noinline)` to sources of some end-to-end test
  binaries where the test expects a certain stack layout that's
  perturbed by inlining

* self_destroying_test_program.cc failed with Access Violation
  instead of with Breakpoint. I'm not 100% sure what's happening
  there as I couldn't reproduce it on my machine. The test uses
  VirtualFree(..., MEM_DECOMMIT) to make parts of the stack unreadable
  to make sure crashpad can handle that. My theory is that clang
  optimized out the call to `_alloca()`, which results in not enough
  of the stack being around for VirtualFree() to be able to decommit.
  https://geidav.wordpress.com/tag/reserved-memory/#:~:text=How%20does%20Windows%20manage%20stack%20memory%3F
  and https://godbolt.org/z/YdbYdKeMh suggest that this theory is
  not completely off -- but the
  `[[maybe_unused]] volatile void* do_not_optimize_away` bit feels
  homeopathic. And yet, with it this seems to pass CQ (see try results
  at patch sets 12 and 20) and without it it doesn't (see patch set 19).
  Maybe this was just luck and the test still feels flakily!
  (The linker's `/STACK` defaults to 1MB stack reserved and 4K
  committed -- 4K kind of seems like it should be enough for that
  VirtualFree call to succeed if that really is the problem.)
  So this part is a bit experimental.

Anyways, nothing uses clang yet, so no behavior change at this point
(other than `gclient sync` downloading less stuff and not failing
by default on Windows).

Includes a one-rev mini_chromium roll:

12ef786772..08d490553b

$ git log 12ef78677..08d490553 --date=short --no-merges --format='%ad %ae %s'
2025-02-13 thakis Prepare mini_chromium for using clang on Windows

Bug: 384682775
Change-Id: I33b54acf18cb6eadfd2167c76c0b4a5824efa64d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6242577
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2025-02-24 11:37:06 -08:00
Nico Weber
db25cdc030 Remove a NOTREACHED() after a __builtin_trap()
__builtin_trap() is already noreturn, so no need to put a
NOTREACHED() after it.

No behavior change.

Bug: chromium:393924694
Change-Id: Ib93b429d8ef7cfe8fb59c4b9e9b8afced06b2ac2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298671
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-02-24 10:05:26 -08:00
Mark Mentovai
85ecbd2a77 Fix SyntaxWarning in build/run_tests.py
Use r-strings for all regular expressions.

Fixes these warnings experienced with Python 3.12
(https://github.com/python/cpython/issues/98401,
https://github.com/python/cpython/pull/99011,
https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
point 2):

run_tests.py:200: SyntaxWarning: invalid escape sequence '\d'
  FINAL_LINE_RE = re.compile('status=(\d+)$')
run_tests.py:441: SyntaxWarning: invalid escape sequence '\*'
  re.match('^\* daemon .+ \*$', line) or line == ''):

Change-Id: I71ddfb1a2ca62654378ae67a99e9aeb4ce7b7394
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6254063
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
2025-02-11 11:22:07 -08:00
Nico Weber
4a227b2d7c Add a newline to scoped_registry_key.h
Fixes a -Wnewline-eof warning with clang.

Bug: 384682775
Change-Id: I45e5285645b408d126893a4a34fd462ca5bde15a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6248264
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-02-10 07:52:32 -08:00
Peter Boström
312919d97f Remove traces of third_party/gyp
gyp is no longer used in/by crashpad (since crrev.com/c/3034984) and
isn't referenced in DEPS.

Bug: 374516744
Change-Id: I06bf6d05457a9f0a084db8ec2da75b6e07780b41
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6168877
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-02-09 19:24:27 -08:00
Sorin Jianu
04bcaa9372 remove set noparent from OWNERS file
Change-Id: Idf5a6c3dbf18f78cac8e71981472729d6077d4f2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6210657
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2025-01-29 13:28:08 -08:00
Nico Weber
9e8334fd28 Always pull clang on Windows
Not used for anything yet.

Bug: chromium:384682775
Change-Id: I00a379756633b0edc849fa1d8bbd6e81f44a6ab1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6214931
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2025-01-29 10:33:22 -08:00
Mark Mentovai
e428b3ad13 doc: Update to Doxygen 1.13.2, fix Doxygen warnings, modernize somewhat
doc/support/crashpad.doxy is updated with:

```
% doxygen -u doc/support/crashpad.doxy
[…]
% doxygen -v
1.13.2
```

Additional updates to doc/support/crashpad.doxy are made:
 - The settings for `DISABLE_INDEX` and `GENERATE_TREEVIEW` are updated,
   as Doxygen’s defaults have changed. This switches from the
   top-of-page index to the side-of-page tree view.
 - The TODO and Deprecated sections have become more prominent under the
   side-of-page tree view than they were with the top-of-page index, and
   they’re not very useful in Crashpad documentation, so they’re
   disabled by setting `GENERATE_TODOLIST` and `GENERATE_DEPRECATEDLIST`
   appropriately. The similar (but unused in Crashpad)
   `GENERATE_TESTLIST` and `GENERATE_BUGLIST` are also disabled.
 - `USE_DOT` is now set, to use `dot` from GraphViz to generate SVG
   diagrams. These look better than the PNGs that Doxygen generated
   without `dot`. `DOT_COMMON_ATTR` and `DOT_EDGE_ATTR` are set to make
   the fonts used in GraphViz-generated SVGs match those used in
   Doxygen-generated HTML/CSS.
 - `EXCLUDE` has been updated to drop directories that no longer exist
   (compat/non_cxx11_lib) and add ones that now do (compat/android,
   compat/ios, and compat/linux).
 - Some values that were otherwise unused in doc/support/crashpad.doxy
   are set back to their default values. The differences from the
   default configuration are shown with `doxygen -x
   doc/support/crashpad.doxy`, and a configuration template with default
   values can be generated for inspection with `doxygen -g
   /tmp/template.doxy`. The tags affected are:
    - `MATHJAX_RELPATH`, unused since `USE_MATHJAX` is `NO`.
    - `LATEX_CMD_NAME` and `LATEX_BIB_STYLE`, unused since `USE_LATEX`
      is `NO`).
    - `EXCLUDE_PATTERNS`, unused since `EXCLUDE_PATH` is empty.

doc/support/doxygen_crashpad.css is updated to change the non-monospaced
font from Open Sans to Noto Sans. It is also updated to use the CSS
properties Doxygen defines for the purpose, rather than monkeying around
with custom selectors. The properties can be discovered by running
`doxygen -w html header.html footer.html customdoxygen.css
doc/support/crashpad.doxy` and reviewing customdoxygen.css.

doc/support/generate.sh is updated to further execute
doc/support/generate_doxygen.py by invoking directly and relying on its
`#!/usr/bin/env python3` line rather than invoking via `python`, which
is no longer available on many systems. doc/support/generate_doxygen.py
has already been Python 3-compatible since f88a116c0e2e
(https://chromium-review.googlesource.com/c/3542572, 2022-03-23).

Finally, there are a number of changes to fix Doxygen warnings produced
by the new Doxygen version or because of new code that has not yet been
run through Doxygen during a test run.

Change-Id: I436688b16530cb0a07dbf89d32601fff689ac2f2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6180234
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-01-23 10:45:59 -08:00
Sorin Jianu
1e81dd5815 crashpad: fix missing . when appending crash report extension
Change-Id: I32e2fe8cd64db04256e35874b91b4162165326ef
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6172933
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
2025-01-23 10:17:46 -08:00
Mark Mentovai
0e548cc670 OWN Crashpad
Includes an update of mini_chromium to
12ef786772d9a73751e2d0f3ef9c792b09c386b5.

12ef786772d9 OWN mini_chromium

Bug: 390190633
Change-Id: Icfe39a08dc439125c53cb7da1ed7ef69850de924
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6177891
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Joey Scarr <jsca@google.com>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2025-01-21 14:24:21 -08:00
Chris Davis
c6d912dac1 Add STARTF_FORCEOFFFEEDBACK to prevent busy cursor on process launch
When starting or restarting Chromium on Windows, we see the busy cursor
briefly.  This is because crashpad does not specify
STARTF_FORCEOFFFEEDBACK in the CreateProcess call.  This is similar to
other changes in Chromium for child processes to avoid the busy cursor.

Bug: 389978731
Change-Id: Ib95cd3b6ce13e3170324e63b43e46a376affc7c8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6173930
Reviewed-by: Will Harris <wfh@google.com>
Commit-Queue: Chris Davis <chrdavis@microsoft.com>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
2025-01-16 16:18:20 -08:00
Leonard Grey
a0025ad44b Roll crashpad/third_party/mini_chromium/mini_chromium/ 63057a19a..22f743de4 (1 commit)
63057a19a3..22f743de47

$ git log 63057a19a..22f743de4 --date=short --no-merges --format='%ad %ae %s'
2024-12-17 lgrey Remove distutils dependency

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: None
Change-Id: I3b3628a938840416bf0044ae9d0f3de14f13e0ed
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6096395
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-12-17 14:04:41 -08:00
Peter Kasting
6419a2e697 Make use of base::fixed_extent<>.
Bug: none
Change-Id: Ia07ebfdd5927e545e3c19b98dc545e7f75ef46ac
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6091638
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-12-13 14:14:57 -08:00
Peter Kasting
4826f5a3b0 Roll crashpad/third_party/mini_chromium/mini_chromium/ c081fd005..63057a19a (3 commits)
c081fd005b..63057a19a3

$ git log c081fd005..63057a19a --date=short --no-merges --format='%ad %ae %s'
2024-12-12 pkasting Fix template param shadowing.
2024-12-12 pkasting Add fixed_extent to base::span.
2024-11-12 mark #include <stddef.h> for size_t

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Change-Id: I47f53d3861147f2d2c7923dc2752fe49796ceda0
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6091637
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
2024-12-12 13:14:23 -08:00
Jesse McKenna
66a7812a40 Add .vscode to .gitignore
VS Code creates a .vscode/ directory in the top level of the repo
to hold config files.

Adding it to .gitignore will make it easier to develop crashpad using
VS Code.

Change-Id: I7afbbbf8ed6c017edc0299a18bf7ad0c11407b93
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6013035
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
2024-11-26 17:51:15 +00:00
Nico Weber
3f1b84197b win: Include stddef.h for offsetof()
A future libc++ revision will stop providing this include transitively.

Bug: 376278210
Change-Id: I79460933ed915bc601278a6d75f2c2ced1130440
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6049220
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-11-25 19:22:36 +00:00
Mark Mentovai
3b0a429371 Fix #includes
- Where std::nullptr_t is used (in namespace std), #include <cstddef>,
   even if it appears alongside <stddef.h> because types like intptr_t
   are used (in the root namespace).
 - Where math library functions are used, #include <cmath> to get and
   use the versions of functions in namespace std which are overloaded
   by argument type, such as std::isinf and std::isnan.

third_party is excluded.

Change-Id: Ic9c143f407e5a9c5cff4098cf566ba5caf4bf6d8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6021439
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2024-11-14 17:06:54 +00:00
Peter Boström
65a45013d0 Replace CHECK(false) instances
In most cases NOTREACHED() is now a better option. Also performs
dead-code removal.

Bug: 40122554, 40580068
Change-Id: I2deffa59d375db7813ea6779b1d387718d5c62c7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6013409
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2024-11-13 18:21:54 +00:00
Nico Weber
02d094f3bb win: IWYU for __argc, __wargv
Bug: chromium:376296991
Change-Id: Iad1a2d59ceb444360f7dad407fdfe11f6f1aac69
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5991037
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2024-11-05 16:26:33 +00:00
Takuto Ikuta
b8937c6cb4 tools: fix missing include for EXIT_{SUCCESS,FAILURE}
Bug: 375980422
Change-Id: Ia3afad0d2a8bf701f783720554ca8887a34b6fda
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5969699
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2024-10-28 12:18:32 +00:00
Peter Boström
6c57c083e6 Fix -Wsign-compare in CrashReportDatabaseTest
Bug: crashpad:42310127
Change-Id: I8a060afd6d976379064c4177a40b337942252087
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5951643
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2024-10-22 06:14:14 +00:00
Peter Boström
70ccb76751 Accept longer Settings::Data structs
This attempts to be somewhat forward-compatible with upcoming additions
to the Data struct, most importantly to not lose the client ID if we
ever need to downgrade / read data from a future crashpad version.

Bug: 42310127
Change-Id: Ic3914fdd8460f4f41e5bb523d5c52361767880dd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5915193
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Jesse McKenna <jessemckenna@google.com>
Commit-Queue: Peter Boström <pbos@chromium.org>
2024-10-22 02:23:41 +00:00
Brian Bosak
41c74f5622 [fuchsia] Remove duplicate LogSink routes
Routing LogSink manually is not needed, as this is done implicitly
through the client shard. Future CLs will update the routing used in
the shard, so it's necessary to cleanup these duplicate routes in
order to update the shards.

Bug: fuchsia:345827642
Change-Id: I529ab52412530382240d5c6276c1ef01ab349ecc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5941579
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Brian Bosak <bbosak@google.com>
2024-10-17 23:28:48 +00:00
Peter Boström
e05f665694 Roll cpp-httplib
This brings in https://github.com/yhirose/cpp-httplib/pull/1962 which
addresses -Wdeprecated-literal-operator.

Note that this contains v18.0 but is is 15 commits ahead as no release
has yet been made.

https://github.com/yhirose/cpp-httplib/compare/v0.18.0...0cc1ca9a8dcff402891582dda4da34a5d1687adc

Bug: chromium:373130005
Change-Id: Iada3259107e68d0eeabf20812df2d73e50daa750
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5932425
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2024-10-15 23:17:41 +00:00
Jinyoung
1f24e58fd6 Make the network use proxy settings by default for Windows
Bug: chromium:369900059
Change-Id: I0b39a72938b3dc591ab8b4894a7a23a3deb4604d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5920056
Commit-Queue: Jinyoung Hur <hur.ims@navercorp.com>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-10-11 04:28:32 +00:00
Nico Weber
032bcc92fb Mark CrashWithoutDumping() as [[noreturn]]
No behavior change.

Bug: none
Change-Id: Ie838df830221a09d5401c6c73c8c889ea714940e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5905738
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2024-10-04 04:08:15 +00:00
Peter Boström
030fdeb26e Roll crashpad/third_party/mini_chromium/mini_chromium/ e04c707cb..c081fd005 (3 commits)
e04c707cb3..c081fd005b

$ git log e04c707cb..c081fd005 --date=short --no-merges --format='%ad %ae %s'
2024-10-03 pbos Reimplement LAZY_STREAM with a switch
2024-10-03 pbos Fix LOG(FATAL) compile errors
2024-10-03 pbos Make LOG(FATAL) [[noreturn]]

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: chromium:40254046
Change-Id: I78c16747fbc5fbba8c2d17c16fec47e467b00189
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5904404
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
2024-10-04 02:18:17 +00:00
Josip Sokcevic
b39cca168f [DEPS] Rely on buildtools recursedep to fetch clang-format
buildtools has first party support to fetch clang-format so no longer
needed to use custom hooks.

Bug: chromium:336843583
Change-Id: I2c29ad9df579b605ff6e1d967da6502ffcd12faf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5586422
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-09-23 22:32:52 +00:00
Justin Cohen
6d37f81ace ios: Remove OS filter for iOS simulator tests.
Bug: 365974437
Change-Id: I9ada04b3602487513ff14ef1124feb43ddfb323a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5855599
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2024-09-11 22:29:44 +00:00
Hzj_jie
e3abe1ed44 [fuchsia] remove unnecessary build args
The gn-args have default values in fuchsia-gn-sdk and not necessary
to be repeated - api-level 18 is also removed and breaks crashpad.

Bug: crashpad:365889763
Change-Id: I2a5a573158db434dd578c92455d0af6c96408d74
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5854005
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2024-09-11 17:43:16 +00:00
Mark Mentovai
35e06fe736 Add Revision to xnu’s README.crashpad
Bug: 349528232
Change-Id: If5550f95a27655e1ad94830c6cd8b33dd2a068c4
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5845908
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2024-09-09 15:45:19 +00:00
Peter Wen
915913bd5a Fix crashpad for PGO generation
This GN arg config repros the failure in the bug:
```
chrome_pgo_phase = 1
is_official_build = true
target_cpu = "arm64"
target_os = "android"
use_remoteexec = true
```

Commenting out either is_official_build or chrome_pgo_phase removes the
compile error, but since many bots build with is_official_build, the
culprit must be chrome_pgo_phase.

Bug: chromium:362787700
Change-Id: I536a098693b85ed93c22e38e639b393fcb480e79
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5826154
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2024-09-03 17:27:07 +00:00
Peter Kasting
f9fa2d112b [reland] Don't redefine macros from base/compiler_specific.h.
`DISABLE_CFI_ICALL` is already defined in that header; use it.

This is both simpler and less likely to trigger macro redefinition
errors.

This was previously landed in crrev.com/c/5805458, but reverted due to
crbug.com/362787700.

Bug: chromium:362787700
Change-Id: I1fc8d9dc0b099c67ea7d774034b7691691ff2a50
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5825328
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2024-08-28 22:57:49 +00:00
Mark Mentovai
50faaf111e Revert "Don't redefine macros from base/compiler_specific.h."
This reverts commit 458bdec9852280f091a72f9d90eb75f04d0af05f.

Reason for revert: Crashpad roll into Chrommium failed.

https://chromium-review.googlesource.com/c/5805903
https://ci.chromium.org/ui/p/chromium/builders/try/android-x64-rel/171929/
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8738938901079891665/+/u/compile__with_patch_/stdout

While linking libcrashpad_handler_trampoline.so:

```
ld.lld: error: undefined symbol: std::__Cr::__libcpp_verbose_abort(char const*, ...)
>>> referenced by ascii.cc
>>>               obj/third_party/abseil-cpp/absl/strings/strings/ascii.o:(std::__Cr::__throw_out_of_range(char const*))
>>> referenced by lightweight_quarantine.cc
>>>               allocator_core/lightweight_quarantine.o:(partition_alloc::internal::LightweightQuarantineBranch::~LightweightQuarantineBranch()) in archive obj/base/allocator/partition_allocator/src/partition_alloc/liballocator_core.a
>>> referenced by lightweight_quarantine.cc
>>>               allocator_core/lightweight_quarantine.o:(partition_alloc::internal::LightweightQuarantineBranch::Purge()) in archive obj/base/allocator/partition_allocator/src/partition_alloc/liballocator_core.a
>>> referenced 1 more times
[…]
ld.lld: error: undefined symbol: std::get_new_handler()
[…]
ld.lld: error: undefined symbol: _Unwind_Backtrace
[…]
ld.lld: error: undefined symbol: _Unwind_GetIP
[…]
ld.lld: error: undefined symbol: __cxa_guard_acquire
[…]
ld.lld: error: undefined symbol: __cxa_guard_release
[…]
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

Original change's description:
> Don't redefine macros from base/compiler_specific.h.
>
> `DISABLE_CFI_ICALL` is already defined in that header; use it.
>
> This is both simpler and less likely to trigger macro redefinition
> errors.
>
> Bug: none
> Change-Id: I3ecfe9b6dc4ac42c6a69b3fd9c6d2c68fe8e62a2
> Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5805458
> Reviewed-by: Mark Mentovai <mark@chromium.org>

Bug: none
Change-Id: Ie225e03e07ab3d0a00933217b377cee14fcdb8b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5806223
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2024-08-22 16:33:50 +00:00
Peter Kasting
756637881a Roll crashpad/third_party/mini_chromium/mini_chromium/ 7eca85315..e04c707cb (3 commits)
7eca853158..e04c707cb3

$ git log 7eca85315..e04c707cb --date=short --no-merges --format='%ad %ae %s'
2024-08-21 pkasting Remove `WPRINTF_FORMAT`.
2024-08-21 pkasting Move/remove macros in compiler_specific.h to match Chromium.
2024-08-13 pbos Remove NOTREACHED_IN_MIGRATION()

Created with:
  roll-dep crashpad/third_party/mini_chromium/mini_chromium

Bug: none
Change-Id: Ief091ad8f6f9a775ccf8b53fb5f884be6834b0f3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5805983
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-08-22 02:48:21 +00:00
Peter Kasting
458bdec985 Don't redefine macros from base/compiler_specific.h.
`DISABLE_CFI_ICALL` is already defined in that header; use it.

This is both simpler and less likely to trigger macro redefinition
errors.

Bug: none
Change-Id: I3ecfe9b6dc4ac42c6a69b3fd9c6d2c68fe8e62a2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5805458
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-08-22 02:47:50 +00:00
Peter Kasting
adb22c8169 Switch from ALIGNAS() to alignas().
There is no longer a need to use this macro; compilers have no problem
with `alignas()` nowadays.

Subsequent CLs will remove the macro entirely once it's unused in both
Crashpad and Chromium.

Bug: none
Change-Id: I94675f3f674f9bc32a213e972a017980dcd1c014
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5805982
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2024-08-22 00:55:59 +00:00
Peter Boström
6265674c98 Migrate to NOTREACHED()
This was tested locally by adding "-Wunreachable-code-aggressive" after
making NOTREACHED() [[noreturn]] in mini_chromium and then getting that
to compile.

Bug: chromium:40580068
Change-Id: I7ec1c72be1d73436d128660a621e9060eaebaee8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5780891
Reviewed-by: Mark Mentovai <mark@chromium.org>
2024-08-14 03:11:45 +00:00