Skip to content

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Jan 26, 2026

The opposite of sentry_value_to_msgpack. For offline caching of Crashpad envelopes.

Required for:

Example usage for msgpacked crashpad attachments (__sentry-event and __sentry-breadcrumbsN):

static sentry_value_t
read_msgpack_file(const sentry_path_t *path)
{
size_t size;
char *data = sentry__path_read_to_buffer(path, &size);
if (!data) {
return sentry_value_new_null();
}
sentry_value_t value = sentry__value_from_msgpack(data, size);
sentry_free(data);
return value;
}

#skip-changelog (internal)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 83511fb

When parsing multiple sequential msgpack values where the first value
is a list, subsequent values were incorrectly appended directly to that
list instead of creating a wrapper list (e.g., [1,2] followed by 3
produced [1,2,3] instead of [[1,2], 3]).

Fix by checking on the first iteration if there's more data coming. If
so, immediately wrap the first value in a list, ensuring the wrapper
list is created upfront when needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

jpnurmi and others added 3 commits January 26, 2026 11:29
When mpack_write_i64() serializes positive int64 values, it optimizes
them using unsigned formats. The deserialization was treating all values
above INT32_MAX as uint64, which broke round-trip for signed integers.

Now values in range (INT32_MAX, INT64_MAX] deserialize as int64, and
only values > INT64_MAX deserialize as uint64.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mpack_node_double() handles both types, so no need for separate cases.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jpnurmi added a commit that referenced this pull request Jan 26, 2026
Add explicit cases for mpack_type_missing and mpack_type_bin to satisfy
-Wswitch-enum compiler flag.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jpnurmi added a commit that referenced this pull request Jan 26, 2026
jpnurmi added a commit that referenced this pull request Jan 26, 2026
jpnurmi added a commit that referenced this pull request Jan 26, 2026
@jpnurmi jpnurmi requested a review from JoshuaMoelans January 26, 2026 16:51
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.

2 participants