frida / frida-swift-bridge

Frida's finally getting Swifty
Apache License 2.0
126 stars 15 forks source link

protocols: Handle the case when a weak protocol descriptor symbol is undefined #14

Closed hot3eed closed 11 months ago

hot3eed commented 11 months ago

Background An externally-defined protocol that's imported as a weak symbol (e.g. for backward compatibility) might be undefined on some systems. Currently the bridge would crash in this case since it's trying to dereference a null pointer.

Changes

How it was tested A hello-world SwiftUI app built using Xcode 15.0 (15A240d) on macOS 13.5.2 that was crashing before this change.

hot3eed commented 11 months ago

@oleavr Thanks for the review! Any other comments you'd like to be addressed?

oleavr commented 11 months ago

@hot3eed All good, just me being bad at context-switching — sorry for the delay! 😅