-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
feat: Added support for arm64e #3398
Conversation
|
Although the project is now compiling, when we run @armcknight maybe you would like to take a look at this? |
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4977fbc | 1217.26 ms | 1239.82 ms | 22.56 ms |
3a01b17 | 1212.12 ms | 1221.80 ms | 9.68 ms |
3297d6e | 1228.57 ms | 1255.04 ms | 26.47 ms |
5e78d2b | 1229.90 ms | 1252.94 ms | 23.04 ms |
a423161 | 1234.41 ms | 1246.41 ms | 12.00 ms |
2124551 | 1246.10 ms | 1254.84 ms | 8.74 ms |
3f366ee | 1244.49 ms | 1257.28 ms | 12.79 ms |
c5232ea | 1226.06 ms | 1246.57 ms | 20.50 ms |
4afae53 | 1217.65 ms | 1229.27 ms | 11.62 ms |
7bb0873 | 1215.65 ms | 1235.00 ms | 19.35 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4977fbc | 20.76 KiB | 419.85 KiB | 399.10 KiB |
3a01b17 | 20.76 KiB | 436.33 KiB | 415.57 KiB |
3297d6e | 21.58 KiB | 418.45 KiB | 396.86 KiB |
5e78d2b | 22.85 KiB | 411.17 KiB | 388.32 KiB |
a423161 | 22.85 KiB | 406.69 KiB | 383.85 KiB |
2124551 | 22.85 KiB | 411.69 KiB | 388.84 KiB |
3f366ee | 20.76 KiB | 427.84 KiB | 407.08 KiB |
c5232ea | 22.85 KiB | 413.98 KiB | 391.13 KiB |
4afae53 | 22.84 KiB | 402.08 KiB | 379.24 KiB |
7bb0873 | 22.85 KiB | 407.09 KiB | 384.24 KiB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3398 +/- ##
=============================================
+ Coverage 91.424% 91.455% +0.030%
=============================================
Files 628 629 +1
Lines 50530 50619 +89
Branches 18255 18338 +83
=============================================
+ Hits 46197 46294 +97
+ Misses 4240 4233 -7
+ Partials 93 92 -1
... and 15 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.
The changes look good, but CI is complaining.
Thanks! Do we have plans to fix this already? |
Sorry for the late reply @brustolin ... we're currently investigating the root cause. |
Any update on this one @armcknight |
@armcknight @brustolin how do I repro this? I'm running on device with the iOS-Swift sample app and starting/ending profiles and I can't get it to crash. |
Are you running it on a real device? Simulators don't crash. Run the app and start a transaction, it crashes for me. |
@brustolin I can't repro on an iPhone 14 Pro Max running iOS-Swift at the head of this branch. Are you testing with an arm64e or arm64 device? I tried with multiple concurrent transactions as well and everything seems to work fine. @armcknight do you have an older device you can test with? |
Ow, sorry. iOS-Swift is not configured to run with arm64e, I must have roll it back. It only crashes when I compile the sample for arm64e. I will commit the change, you should have both options now. |
@brustolin Thanks, able to repro now. It appears this is crashing within profiling code any place where |
There is some relevant documentation on Apple's page about arm64e pointer authentication:
I suspect something like this is causing the crash. |
Why not? We would potentially have to use |
@armcknight No doubt we can make the change, I just would not be confident that it actually fixes the issue without understanding why using a |
@armcknight @indragiek Any progress to solve this crash? |
@brustolin check out the changes Indragie pushed up recently. Do you still see the crash with those? |
@brustolin Would you mind pulling the commit I just added and trying again? That was a nasty merge you had to do, and it overwrote some of indragie's changes. Sorry about that. I just tried my test and it no longer crashes. The profiles I created both appeared in the dash, so things appear to still function normally. |
@brustolin would you mind capturing your repro steps in a UI test so we can eliminate any variation between our machines and see what happens when we run it in CI? |
@armcknight I added a test, but this only crashes when running in the real device (its not even possible to run on a simulator). |
@brustolin Oh, I forgot that you were originally testing with iOS13-Swift. Is there no way to do it in the normal iOS-Swift sample app so we can test it in a simulator? That sample is still set up to build for the arm64e target. Is there something special about iOS13-Swift? |
The problem only occurs when the target is arm64e. This is the whole issue. I don't want to change iOS-Swift because of this; we would have to test on real devices anyway. |
Hello @armcknight and @indragiek. This have a higher priority now. It's affecting Xcode SwiftUI visualiser for macOS projects as described in here. Do you have any suggestions what could we do? |
Awesome, Thanks @indragiek for the fix!! |
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 leave the review of the CPP code to @armcknight cause I'm not that knowledgeable in CPP.
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'm not clear on why we can change std::shared_ptr
to naked pointers vs using unique_ptr
everywhere (partly because it's used in some places (https://github.com/getsentry/sentry-cocoa/pull/3398/files#diff-0397b590fd7ff98685a61fa9a99cceccf30bdf224754ba5f92448abd0852885bR80)... does C++ autobox naked pointers?)
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'm satisfied with the answers to my last questions, let's ship it!
📜 Description
A developer may choose the arm64e architecture for their iOS app to benefit from enhanced security features.
Sentry was not compiling for this architecture due to issues with accessing machine context properties
By using
arm_thread_state64_get_*
macros, we can read the necessary information.💡 Motivation and Context
closes #3344
💚 How did you test it?
Samples
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps