Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Auto-populate `event.user.id` with a persistent per-installation UUID when no explicit user ID is set. ([#1661](https://github.com/getsentry/sentry-native/pull/1661))
- Crashpad: add error log for oversized envelopes (HTTP 413 Content Too Large). ([#1706](https://github.com/getsentry/sentry-native/pull/1706), [crashpad#155](https://github.com/getsentry/crashpad/pull/155))
- Crashpad: support modifying attachments after `sentry_init` on macOS. ([#1705](https://github.com/getsentry/sentry-native/pull/1705), [crashpad#153](https://github.com/getsentry/crashpad/pull/153))

**Fixes**:

Expand Down
3 changes: 0 additions & 3 deletions include/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
* attachment paths will be resolved according to the current working directory
* at the time of envelope creation. When adding and removing attachments, they
* are matched according to their given `path`. No normalization is performed.
* When using the `crashpad` backend on macOS, the list of attachments that will
* be added at the time of a hard crash will be frozen at the time of
* `sentry_init`, and later modifications will not be reflected.
*/

#ifndef SENTRY_H_INCLUDED
Expand Down
6 changes: 4 additions & 2 deletions src/backends/sentry_backend_crashpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,8 @@ crashpad_backend_prune_database(sentry_backend_t *backend)
crashpad::PruneCrashReportDatabase(data->db, &condition);
}

#if defined(SENTRY_PLATFORM_WINDOWS) || defined(SENTRY_PLATFORM_LINUX)
#if defined(SENTRY_PLATFORM_WINDOWS) || defined(SENTRY_PLATFORM_LINUX) \
|| defined(SENTRY_PLATFORM_MACOS)
static bool
ensure_unique_path(sentry_attachment_t *attachment)
{
Expand Down Expand Up @@ -1101,7 +1102,8 @@ sentry__backend_new(void)
backend->user_consent_changed_func = crashpad_backend_user_consent_changed;
backend->get_last_crash_func = crashpad_backend_last_crash;
backend->prune_database_func = crashpad_backend_prune_database;
#if defined(SENTRY_PLATFORM_WINDOWS) || defined(SENTRY_PLATFORM_LINUX)
#if defined(SENTRY_PLATFORM_WINDOWS) || defined(SENTRY_PLATFORM_LINUX) \
|| defined(SENTRY_PLATFORM_MACOS)
backend->add_attachment_func = crashpad_backend_add_attachment;
backend->remove_attachment_func = crashpad_backend_remove_attachment;
#endif
Expand Down
4 changes: 1 addition & 3 deletions tests/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,9 @@ def assert_crashpad_upload(req, expect_attachment=False, expect_view_hierarchy=F
assert_event_meta(attachments.event, integration="crashpad")
if expect_attachment:
assert attachments.cmake_cache > 0
else:
assert attachments.cmake_cache == -1
if expect_attachment and (sys.platform == "win32" or sys.platform == "linux"):
assert attachments.bytes_bin == b"\xc0\xff\xee"
else:
assert attachments.cmake_cache == -1
assert attachments.bytes_bin == None
if expect_view_hierarchy:
assert_attachment_content_view_hierarchy(attachments.view_hierarchy)
Expand Down
8 changes: 0 additions & 8 deletions tests/test_integration_crashpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,10 @@ def test_crashpad_wer_crash(cmake, httpserver, run_args):
pytest.param(
["attach-after-init"],
{},
marks=pytest.mark.skipif(
sys.platform == "darwin",
reason="crashpad doesn't support dynamic attachments on macOS",
),
),
pytest.param(
["attachment", "attach-after-init", "clear-attachments"],
{},
marks=pytest.mark.skipif(
sys.platform == "darwin",
reason="crashpad doesn't support dynamic attachments on macOS",
),
),
],
)
Expand Down
Loading