Skip to content

Capture NSException crashes rethrown by objc_exception_rethrow #9045

Description

@linear-code

In SDK 9.20.0, NSException-originated crashes rethrown through objc_exception_rethrow can be silently dropped.

AutoLayout assertion failures caught internally by NSISEngine bypass the NSException monitor because the uncaught exception handler does not fire. CPPExceptionTerminate() runs but skips fatal-exception recording due to the isNSExceptionExc guard, which assumes the NSException monitor already handled the crash. Execution then reaches abort() with no report written.

Investigate the interaction between SentryCrashMonitor_NSException.m and the rethrow path, including the double-reporting prevention assumptions introduced in PR #7420. #7984 addressed non-NSException Objective-C throws but not this case.

The affected path is:

NSAssertionHandler throws NSException → Combine propagates it → NSISEngine catches and calls objc_exception_rethrow_objc_terminate()CPPExceptionTerminate()abort()SIGABRT.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions