Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- add support for crash-time attachments via hint ([#2112](https://github.com/getsentry/sentry-native/pull/2112))If none of the above apply, you can opt out of this check by adding |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d30860a. Configure here.
| if (should_dump) { | ||
| if (!sentry_value_is_frozen(hint.attachments)) { | ||
| write_attachment_manifest(state, hint.attachments); | ||
| } |
There was a problem hiding this comment.
Crashpad ignores crash-time hint attachments
High Severity
Crashpad writes a __sentry-attachments manifest after on_crash/before_send but never registers or unregisters those files with the crashpad client. Crashpad only uploads attachments added via AddAttachment or the startup list, so hint changes never reach the minidump upload: new attachments are dropped and cleared ones still ship.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d30860a. Configure here.
| // Manifest writes must continue post-crash so attachments registered | ||
| // from on_crash/before_send reach the daemon | ||
| native_backend_write_attachments(state->event_path); | ||
| native_backend_write_attachments(state->event_path, NULL); |
There was a problem hiding this comment.
Scope flush overwrites crash hint attachments
Medium Severity
native_backend_flush_scope still writes the scope attachment list after a crash, even though native_backend_except already wrote the hint list. A later flush replaces that crash-time manifest with scope attachments, dropping hint-only files and restoring ones the callback cleared.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit d30860a. Configure here.
| sentry__hint_set_attachments( | ||
| &hint, sentry__merge_attachments(hint.attachments, NULL)); | ||
| event = sentry__before_send(options, event, &hint); | ||
| } |
There was a problem hiding this comment.
Recursive crash invokes before_send again
Medium Severity
The inproc handler used to skip before_send when skip_hooks was set for a recursive crash. The split now calls sentry__before_send whenever on_crash is unset, so a crash inside before_send can re-enter that callback.
Reviewed by Cursor Bugbot for commit d30860a. Configure here.


Merge attachments and pass as
hinttoon_crash, then use the resulting hint attachments in the envelope.Caution
BREAKING CHANGE:
on_crashcallbacks now have an additionalsentry_hint_t *hintparameter.Close: #2098