Post

Replies

Boosts

Views

Activity

Reply to C++ exceptions on iOS
Any update on this? I have been depending on dynamically rebind __cxa_throw in the loaded libraries to catch the original stack trace, implementation explained here https://github.com/facebook/fishhook The problem is after iOS 14.5 it's not working anymore because I cannot find the Mach-O section where "lazy symbol pointer table" is found, and thus not able to rebind __cxa_throw_. I have discussed this in a lap in WWDC21, it looks related to a change called "Chained fixups" that I'm still searching for. If the bug reported here is fixed I won't need that workaround at all. More info: Sections in > iOS 14.5 Image .... /usr/lib/libc++.1.dylib sect name: __got_weak in __DATA found non lazy symbol pointer table ✔️ sect name: __data in __DATA sect name: __bss in __DATA sect name: __common in __DATA sect name: __got in __DATA_CONST found non lazy symbol pointer table ✔️ sect name: __const in __DATA_CONST Sections < iOS 14.5 Image .... /usr/lib/libc++.1.dylib sect name: __got_weak in __DATA found non lazy symbol pointer table ✔️ sect name: __la_weak_ptr in __DATA found lazy symbol pointer table ✔️ sect name: __got in __DATA_CONST found non lazy symbol pointer table ✔️ sect name: __la_symbol_ptr in __DATA_CONST found lazy symbol pointer table ✔️ ✅ found __cxa_throw in __la_symbol_ptr in __DATA_CONST
Jun ’21
Reply to __la_symbol_ptr Mach-O section is no longer found after iOS 14.5
I found that the symbol __cxa_throw has been moved to __AUTH_CONST and it has found multiple non-lazy pointer symbol tables (__auth_got and __got). But the implementation we had looked at in the last section found __got. So I updated the implementation to look into segment __AUTH_CONST in section __auth_got
Replies
Boosts
Views
Activity
Jun ’21
Reply to C++ exceptions on iOS
Any update on this? I have been depending on dynamically rebind __cxa_throw in the loaded libraries to catch the original stack trace, implementation explained here https://github.com/facebook/fishhook The problem is after iOS 14.5 it's not working anymore because I cannot find the Mach-O section where "lazy symbol pointer table" is found, and thus not able to rebind __cxa_throw_. I have discussed this in a lap in WWDC21, it looks related to a change called "Chained fixups" that I'm still searching for. If the bug reported here is fixed I won't need that workaround at all. More info: Sections in > iOS 14.5 Image .... /usr/lib/libc++.1.dylib sect name: __got_weak in __DATA found non lazy symbol pointer table ✔️ sect name: __data in __DATA sect name: __bss in __DATA sect name: __common in __DATA sect name: __got in __DATA_CONST found non lazy symbol pointer table ✔️ sect name: __const in __DATA_CONST Sections < iOS 14.5 Image .... /usr/lib/libc++.1.dylib sect name: __got_weak in __DATA found non lazy symbol pointer table ✔️ sect name: __la_weak_ptr in __DATA found lazy symbol pointer table ✔️ sect name: __got in __DATA_CONST found non lazy symbol pointer table ✔️ sect name: __la_symbol_ptr in __DATA_CONST found lazy symbol pointer table ✔️ ✅ found __cxa_throw in __la_symbol_ptr in __DATA_CONST
Replies
Boosts
Views
Activity
Jun ’21