Dear Experts,
When I try to use Address Sanitizer on my iOS app, it reports "attempting free on address which was not malloc()-ed" whenever a C++ exception is caught.
If first saw it inside Apple's libFontParser and filed FB13271831, but I now see it in my own code. The Address Sanitizer stack trace always starts like this:
#1 0x215766ae8 in __cxa_decrement_exception_refcount+0x40 (/usr/lib/libc++abi.dylib:arm64e+0x13ae8)
Having looked up __cxa_decrement_exception_refcount
in the C++ ABI docs, my guess is that the C++ runtime is creating and destroying the exception objects in some way that Address Sanitizer doesn't properly understand, causing it to think that they are being freed without having been allocated by malloc.
This is only really a problem because it does not seem possible to continue after ASan has reported this error; the app is terminated.
Question: is there a way to tell Address Sanitiser to ignore errors in this function? And/or, is there a way to continue after the error?
Thanks.