Skip to content

Commit

Permalink
workaround widevine issue by reducing mach exception mask
Browse files Browse the repository at this point in the history
  • Loading branch information
diederich authored and mangini committed Jun 28, 2023
1 parent d277532 commit 19ba3d1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,12 @@ installExceptionHandler(void)
int error;

const task_t thisTask = mach_task_self();
exception_mask_t mask = EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC
| EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;
// This is the default, which breaks widevine:
// `exception_mask_t mask = EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;`
// Following is used by chromium's crashpad, which works with widevine
// We're not seeing some crashed being picked up by the mach exception handler with this
// but they still end up in Sentry via the signal handler.
exception_mask_t mask = EXC_MASK_CRASH | EXC_MASK_BAD_ACCESS;

SentryCrashLOG_DEBUG("Backing up original exception ports.");
kr = task_get_exception_ports(thisTask, mask, g_previousExceptionPorts.masks,
Expand Down

0 comments on commit 19ba3d1

Please sign in to comment.