What\'s the difference between KERN_INVALID_ADDRESS
and KERN_PROTECTION_FAILURE
on iPhone OS?
I have two crash reports from an ad-hoc beta
EXC_BAD_ACCESS (SIGBUS) KERN_PROTECTION_FAILURE
means that the virtual address is obviously wrong: most CPUs must access memory on a certain byte boundary. Because your data access here is aligned for a 64-bit value (8), it must be trying to execute an instruction that fetches a 128-bit value (such as compare and exchange instruction CMPXCHG16B
). In any case, you can see from the example here that it's 0x00000008
, which probably means you're accessing a structure element that's offset 8 bytes from the beginning, but your structure pointer is NULL
.
EXC_BAD_ACCESS (SIGSEGV) KERN_INVALID_ADDRESS
means that the virtual address you're refererencing is not in the page tables or you don't have access. It's a virtual address that you're not allowed to access. For your example address address 0x67696c69
it's likely that this is something that is not a pointer that was treated like a pointer; or your data structure that contains the pointer was free'd and overwritten with other data.
For your KERN_INVALID_ADDRESS
example, the pointer data spells out ASCII 'ilig' (because it's little endian). Therefore the memory where your pointer was stored was likely overwritten with some sort of string.
In both cases, it's likely that something overwrote the data structures in your UIWindow
.