fix: align __cxa_throw mprotect ranges#8221
Merged
supervacuus merged 5 commits intoJun 26, 2026
Merged
Conversation
📲 Install BuildsiOS
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9787f05 | 1233.67 ms | 1269.00 ms | 35.33 ms |
| 119dc37 | 1217.64 ms | 1250.44 ms | 32.80 ms |
| 31a83fd | 1218.63 ms | 1247.18 ms | 28.55 ms |
| 5cc1f4e | 1223.49 ms | 1258.69 ms | 35.20 ms |
| 92bcc8f | 1233.43 ms | 1270.20 ms | 36.77 ms |
| 943b250 | 1214.69 ms | 1257.32 ms | 42.63 ms |
| 78aad96 | 1232.02 ms | 1262.42 ms | 30.40 ms |
| 1caa212 | 1229.06 ms | 1251.23 ms | 22.17 ms |
| 2446b3d | 1218.36 ms | 1253.98 ms | 35.62 ms |
| 6844d69 | 1228.25 ms | 1265.20 ms | 36.95 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9787f05 | 24.14 KiB | 1.18 MiB | 1.15 MiB |
| 119dc37 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| 31a83fd | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| 5cc1f4e | 24.14 KiB | 1.18 MiB | 1.16 MiB |
| 92bcc8f | 24.14 KiB | 1.15 MiB | 1.13 MiB |
| 943b250 | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| 78aad96 | 24.14 KiB | 1.18 MiB | 1.16 MiB |
| 1caa212 | 24.14 KiB | 1.18 MiB | 1.16 MiB |
| 2446b3d | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| 6844d69 | 24.14 KiB | 1.20 MiB | 1.17 MiB |
NinjaLikesCheez
approved these changes
Jun 26, 2026
itaybre
pushed a commit
that referenced
this pull request
Jun 26, 2026
* use sysconf(_SC_PAGESIZE) instead of getpagesize() * wrap sysconf to adhere to POSIX in-band error contract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Page aligns Mach-O (down for start and up for end) section offsets before using them as address and size arguments with
mprotect().Also checked against
KSCrash2.5.1(latest stable) still uses unaligned addresses.develop: severely changed the swapper implementation altogether and already uses page-aligned addresses.Ergo: no need to align with upstream. We replace it with
developanyway (no need to introduce surrounding changes to fix this).💡 Motivation and Context
Fixes #8156
mprotect()has always required page-aligned addresses, but only in xOS/Xcode 27 does it returnEINVALfor unaligned addresses.💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.