Exceptions thrown across 3rd-party libraries may not be caught in 64bit apps

Originator:mike.ferenduros
Number:rdar://20843534 Date Originated:07-May-2015 00:10 AM
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
 
Summary:
When throwing an NSException in a 64bit iOS app, if there is a function that does not support 64bit exceptions in the callstack between the @throw and the @catch, the exception is not caught and the app instead terminates with a fatal error.

This can easily happen when using 3rd-party C libraries, which are often compiled without the flag required to add ObjC exception support since this is not advertised anywhere or warned about.

Steps to Reproduce:
As description

Expected Results:
I would expect the documentation on exception-handling to note the issue.

I would expect the LLVM compiler to emit a warning by default when compiling ARM64 code without exception support, or to enable the required flag by default.

Actual Results:
The documentation makes no mention of the issue.

The compiler does not warn when compiling code that can cause this issue.

Version:
6.3.1 (6D1002)

Notes:


Configuration:
iOS / ARM64

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!