What does SEGV_ACCERR mean?

Saltymule picture Saltymule · Oct 1, 2013 · Viewed 29.6k times · Source

I am examining a few crashes that all have the signal SIGSEGV with the reason SEGV_ACCERR. After searching for SEGV_ACCERR, the closest thing I have found to a human readable explanation is: Invalid Permissions for object

What does this mean in a more general sense? When would a SEGV_ACCERR arise? Is there more specific documentation on this reason?

Answer

jjxtra picture jjxtra · Sep 16, 2014

This is an error that I have mostly seen on 64 bit iOS devices and can happen if multiple threads read and change a variable under ARC. For example, I fixed a crash today where multiple background threads were reading and using a static NSDate and NSString variable and updating them without doing any kind of locking or queueing.

Using core data objects on multiple threads can also cause this crash, as I have seen many times in my crash logs.

I also use Crittercism, and this particular crash was a SEGV_ACCERR that only affected 64 bit devices.