-
-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose custom cxa throw and rethrow calls to Unity #3996
Conversation
…d::terminate call stacktrace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me, but I think someone of @getsentry/owners-native should have a look at this proposal, because my CPP on that topic isn't the best. @armcknight, maybe you could also have a look please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3996 +/- ##
=============================================
+ Coverage 90.850% 90.874% +0.024%
=============================================
Files 594 594
Lines 46494 46607 +113
Branches 16641 16690 +49
=============================================
+ Hits 42240 42354 +114
- Misses 4071 4183 +112
+ Partials 183 70 -113
... and 45 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a changelog entry and tested this with the macOS sample app. Previously, the SDK didn't catch the crash report for the following code
void
Sentry::CppSample::rethrowNoActiveCPPException(void)
{
// Rethrowing an exception when there is no active exception will lead to std::terminate being
// called.
throw;
}
No, it does, see screenshot:
Thanks a lot, @munkiki7, LGTM.
Glad to be helpful, @philipphofmann |
📜 Description
I have added custom calls that can be later used by Unity SDK for capturing C++ exceptions on iOS.
Also, when the current exception is NULL (during the std::terminate call) the sentrycrashsc_initSelfThread call is made to enrich the stack trace.
💡 Motivation and Context
The fix is related to this issue.
💚 How did you test it?
I have added the code to the Unity SDK that calls these new exposed functions using the dlsym search:
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps