Skip to content

build: require C++17 for crashpad_client consumers - #160

Merged
jpnurmi merged 1 commit into
getsentryfrom
jpnurmi/fix/cxx-17
Jul 17, 2026
Merged

build: require C++17 for crashpad_client consumers#160
jpnurmi merged 1 commit into
getsentryfrom
jpnurmi/fix/cxx-17

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Brought up at:

The Sentry-maintained CMake metadata for crashpad_client still advertised cxx_std_14, but the headers it installs and exposes use C++17 library types such as std::optional and std::string_view. That lets CMake consumers compile against those headers with an insufficient language standard.

Update the exported usage requirement to cxx_std_17 so the CMake build stays in sync with the upstream Crashpad source requirements. This does not raise sentry-native's effective Crashpad requirement:

The Sentry-maintained CMake metadata for `crashpad_client` still
advertised `cxx_std_14`, but the headers it installs and exposes use
C++17 library types such as `std::optional` and `std::string_view`.
That lets CMake consumers compile against those headers with an
insufficient language standard.

Update the exported usage requirement to `cxx_std_17` so the CMake
build stays in sync with the upstream Crashpad source requirements.
This does not raise sentry-native's effective Crashpad requirement:
Crashpad already sets `CMAKE_CXX_STANDARD` to `17` with
`CMAKE_CXX_STANDARD_REQUIRED` enabled, and sentry-native documents
the Crashpad backend as requiring a C++17-compatible compiler.
@jpnurmi
jpnurmi requested a review from mujacica July 17, 2026 09:57
@jpnurmi
jpnurmi merged commit 9b28f8d into getsentry Jul 17, 2026
28 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/cxx-17 branch July 17, 2026 11:57
jpnurmi added a commit to getsentry/sentry-native that referenced this pull request Jul 21, 2026
* fix(crashpad): wait reliably for dump uploads

The crash dumping test enabled crashpad-wait-for-upload in #1728, but
ReportPendingSync() could race Crashpad's background upload worker. The
worker could consume the queued report first, allowing the synchronous
caller to return while the report was still being uploaded and marked
completed.

Session recovery only considers completed Crashpad reports. On Windows,
the recovery process could therefore start too early, miss the crashed
session, and make the dumping test fail intermittently. Retrying the test
in #1737 reduced the symptom without fixing the race. The stack-overflow
variant did not wait for upload and was later given the same retry
workaround in #1870.

Update Crashpad to serialize pending-report processing so a synchronous
upload waits for an active worker pass to finish. Enable
crashpad-wait-for-upload for the stack-overflow case, remove both flaky
markers, and remove the now-unused flaky import.

The Crashpad update also includes getsentry/crashpad#160, which requires
C++17 for crashpad_client consumers.

* Update CHANGELOG.md

* Bump crashpad

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants