Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

NSLocale.alloc() causes segmentation fault #3

Open
logancollins opened this Issue · 2 comments

1 participant

Logan Collins
Logan Collins

Attempting to allocate an instance of NSLocale causes a segmentation fault, with a recursive loop in -alloc(). It appears that after -alloc() is evaluated, we attempt to retain the result, which NSLocale does not like.

This also affects NSCalendar, and possibly other classes. We should attempt to not retain the value in this case, or special case -alloc.

Logan Collins

Should be fixed in 3dd6eb4.

Logan Collins logancollins reopened this
Logan Collins
Owner

This is once again an issue due to the switch to ARC. While we properly create the result of -alloc during the one-step alloc/init phase, ARC now performs an implicit objc_retain on the object in order to keep it alive in scope. This leads to the same issue we encountered before, as NSLocale and NSCalendar have a special (incorrect) implementation that impedes this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.