getsentry / getsentry/sentry-cocoa

Handle EXC_ARITHMETIC exception codes

Open
#2,665 0 comments 0 reactions 0 assignees View on GitHub
Cocoa Component: SentryCrash Errors Improvement
Dominant language
Swift
Stars
1.1k
Forks
418
Avg merge
2d 3h
Merged PRs (30d)
106

Description

### Description

mach/arm/exception.h defines codes for EXC_ARITHMETIC

```c
#define EXC_ARM_FP_UNDEFINED 0 /* Undefined Floating Point Exception */
#define EXC_ARM_FP_IO 1 /* Invalid Floating Point Operation */
#define EXC_ARM_FP_DZ 2 /* Floating Point Divide by Zero */
#define EXC_ARM_FP_OF 3 /* Floating Point Overflow */
#define EXC_ARM_FP_UF 4 /* Floating Point Underflow */
#define EXC_ARM_FP_IX 5 /* Inexact Floating Point Result */
#define EXC_ARM_FP_ID 6 /* Floating Point Denormal Input */
```

We use these codes to improve the generic exception message
[https://github.com/getsentry/sentry-cocoa/blob/ecd9ecd99f640482be5231aa16d33939dbf33d43/Sources/SentryCrash/Recording/SentryCrashDoctor.m#L445-L447]()

We could achieve this by getting a better machCodeName here
[https://github.com/getsentry/sentry-cocoa/blob/ecd9ecd99f640482be5231aa16d33939dbf33d43/Sources/SentryCrash/Recording/SentryCrashReport.c#L1278-L1281]()

or here

[https://github.com/getsentry/sentry-cocoa/blob/ecd9ecd99f640482be5231aa16d33939dbf33d43/Sources/SentryCrash/Recording/SentryCrashDoctor.m#L300-L310]()

Came up in [https://github.com/getsentry/sentry-cocoa/pull/2662]().

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.