Description
Problem
Swift crashes from fatalError(), assert(), precondition(), and force unwraps currently appear as SIGTRAP signals without the actual Swift error message. While the stack trace and symbolication work correctly, the specific error context is lost.
For example, a crash from:
fatalError("A critical session has expired")
Shows up as a generic SIGTRAP instead of including the message "A critical session has expired".
References
Swift stores crash messages in the __crash_info Mach-O section of libswiftCore.dylib. At crash time, we can read this section to extract the error message.
Sentry: getsentry/sentry-cocoa#1596
Bugsnag: bugsnag/bugsnag-cocoa#948
Description
Problem
Swift crashes from fatalError(), assert(), precondition(), and force unwraps currently appear as SIGTRAP signals without the actual Swift error message. While the stack trace and symbolication work correctly, the specific error context is lost.
For example, a crash from:
Shows up as a generic SIGTRAP instead of including the message "A critical session has expired".
References
Swift stores crash messages in the __crash_info Mach-O section of libswiftCore.dylib. At crash time, we can read this section to extract the error message.
Sentry: getsentry/sentry-cocoa#1596
Bugsnag: bugsnag/bugsnag-cocoa#948