Skip to content

Commit 8a037e9

Browse files
committed
make format
1 parent 50699cb commit 8a037e9

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ installExceptionHandler(void)
487487
}
488488

489489
if (sentrycrashcm_isManagedRuntime()) {
490-
SENTRY_ASYNC_SAFE_LOG_DEBUG("Detected managed Mono/CoreCLR runtime. Not registering exception port for EXC_BAD_ACCESS or EXC_MASK_ARITHMETIC.");
490+
SENTRY_ASYNC_SAFE_LOG_DEBUG("Detected managed Mono/CoreCLR runtime. Not registering "
491+
"exception port for EXC_BAD_ACCESS or EXC_MASK_ARITHMETIC.");
491492
mask &= ~(EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC);
492493
}
493494

@@ -568,14 +569,15 @@ addContextualInfoToEvent(struct SentryCrash_MonitorContext *eventContext)
568569
#endif // SENTRY_HAS_MACH
569570

570571
bool
571-
sentrycrashcm_isManagedRuntime(void) {
572+
sentrycrashcm_isManagedRuntime(void)
573+
{
572574
#if SENTRY_HAS_MACH
573575
for (mach_msg_type_number_t i = 0; i < g_previousExceptionPorts.count; i++) {
574576
// https://github.com/dotnet/runtime/blob/6d96e28597e7da0d790d495ba834cc4908e442cd/src/mono/mono/mini/mini-darwin.c#L85-L90
575577
// https://github.com/dotnet/runtime/blob/6d96e28597e7da0d790d495ba834cc4908e442cd/src/coreclr/nativeaot/Runtime/unix/HardwareExceptions.cpp#L615-L621
576-
if (g_previousExceptionPorts.masks[i] == (EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC) &&
577-
g_previousExceptionPorts.behaviors[i] == EXCEPTION_STATE_IDENTITY &&
578-
g_previousExceptionPorts.flavors[i] == MACHINE_THREAD_STATE) {
578+
if (g_previousExceptionPorts.masks[i] == (EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC)
579+
&& g_previousExceptionPorts.behaviors[i] == EXCEPTION_STATE_IDENTITY
580+
&& g_previousExceptionPorts.flavors[i] == MACHINE_THREAD_STATE) {
579581
return true;
580582
}
581583
}

Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Signal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ handleSignal(int sigNum, siginfo_t *signalInfo, void *userContext)
113113
// Let managed Mono/CoreCLR runtime handle the signal first,
114114
// as they may convert it into a managed exception.
115115
if (g_isManagedRuntime) {
116-
SENTRY_ASYNC_SAFE_LOG_DEBUG("Detected managed Mono/CoreCLR runtime. Passing signal to previous handlers.");
116+
SENTRY_ASYNC_SAFE_LOG_DEBUG(
117+
"Detected managed Mono/CoreCLR runtime. Passing signal to previous handlers.");
117118

118119
uintptr_t sp = sentrycrashcpu_stackPointerFromUserContext(userContext);
119120
uintptr_t ip = sentrycrashcpu_instructionAddressFromUserContext(userContext);
@@ -125,7 +126,8 @@ handleSignal(int sigNum, siginfo_t *signalInfo, void *userContext)
125126
// https://github.com/dotnet/runtime/blob/6d96e28597e7da0d790d495ba834cc4908e442cd/src/mono/mono/mini/exceptions-arm64.c#L538
126127
if (sp != sentrycrashcpu_stackPointerFromUserContext(userContext)
127128
|| ip != sentrycrashcpu_instructionAddressFromUserContext(userContext)) {
128-
SENTRY_ASYNC_SAFE_LOG_DEBUG("Signal converted to a managed exception. Aborting signal handling.");
129+
SENTRY_ASYNC_SAFE_LOG_DEBUG(
130+
"Signal converted to a managed exception. Aborting signal handling.");
129131
return;
130132
}
131133
}

0 commit comments

Comments
 (0)