You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This approach falls short in applications with multiple dynamic libraries, as exceptions thrown in those separate modules aren’t caught by the main exception handler, but it works fine when Sentry is linked statically into the same module.
By using fishhook, which allows functions to be “hooked” by name as they are loaded across various modules, we could dynamically find and intercept all instances of __cxa_throw, even in different dynamic libraries. This would provide more comprehensive and consistent exception handling across an app’s runtime, regardless of the number of C++ modules or how they’re linked.
We used fishhook in the past for trying to get async stacktraces (#998), but we removed it again because it was not working reliably. The problem wasn't fishhook, but how we used it. We now use backtrace_async for async stacktrace in Swift.
We could use fishhook to enhance C++ exception. Currently, the Sentry SDK uses
dlsym
to look up__cxa_throw
.sentry-cocoa/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp
Line 92 in f31a3ef
This approach falls short in applications with multiple dynamic libraries, as exceptions thrown in those separate modules aren’t caught by the main exception handler, but it works fine when Sentry is linked statically into the same module.
By using fishhook, which allows functions to be “hooked” by name as they are loaded across various modules, we could dynamically find and intercept all instances of
__cxa_throw
, even in different dynamic libraries. This would provide more comprehensive and consistent exception handling across an app’s runtime, regardless of the number of C++ modules or how they’re linked.We used fishhook in the past for trying to get async stacktraces (#998), but we removed it again because it was not working reliably. The problem wasn't fishhook, but how we used it. We now use
backtrace_async
for async stacktrace in Swift.This could maybe help with:
The text was updated successfully, but these errors were encountered: