Skip to content

Fix crash in sentrycrashjson_addFloatingPointElement #4580

Open
@philipphofmann

Description

@philipphofmann

Description

The SDK sometimes crashes with SIGPIPE or SIGABRT in sentrycrashjson_addFloatingPointElement

Exception Type: Unknown (SIGPIPE)

Thread 0 Crashed:
0   libsystem_c.dylib               0x1c6ac5f1c         __vfprintf
1   libsystem_c.dylib               0x1c6ac5ba4         _vsnprintf
2   libsystem_c.dylib               0x1c6aca818         snprintf
3   Sentry.framework                0x101810a5c         sentrycrashjson_addFloatingPointElement (Sentry.framework:324)
4   Sentry.framework                0x101812f90         encodeObject (Sentry.framework:342)
5   Sentry.framework                0x1018133dc         [inlined] encodeObject (Sentry.framework:384)
6   Sentry.framework                0x1018133dc         encodeObject (Sentry.framework:384)
7   Sentry.framework                0x101812d80         +[SentryCrashJSONCodec encode:options:error:] (Sentry.framework:427)
8   Sentry.framework                0x101824870         -[SentryCrashScopeObserver toJSONEncodedCString:] (Sentry.framework:149)
9   Sentry.framework                0x10182465c         -[SentryCrashScopeObserver addSerializedBreadcrumb:] (Sentry.framework:90)
10  Sentry.framework                0x10185fdf0         -[SentryScope addBreadcrumb:] (Sentry.framework:138)
11  Sentry.framework                0x10183db08         -[SentryHub configureScope:] (Sentry.framework:555)
12  Sentry.framework                0x101864e88         +[SentrySDK configureScope:] (Sentry.framework:406)

We see this also in our internal SDK crash detection.

Originally reported here: #4579.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions