Fixed crashes due to race conditions with `NSMutableDictionary` access in `AFHTTPRequestSerializer` by alexbird · Pull Request #3526 · AFNetworking/AFNetworking

added 3 commits

March 8, 2016 16:43
…RequestSerialiser, added a dispatch queue for safety in multithreaded environments.
…RequestSerialiser – Added unit test which reproduces the issue.

NB: as the crash is caused by using a dictionary in a way that the runtime did not expect, it typically causes intermittent crashes which are almost always in unrelated areas of the app. This seems to be strongly related to deallocation of the values in the dictionary, but this may not be the only cause. As such, there is nothing to positively test for, the test succeeds if it doesn't EXC_BAD_ACCESS when cleaning up the @autoreleasepool at the end.
…RequestSerialiser – Moved unit test to a better location.

@kcharwood kcharwood changed the title Fix for crashes due to dangerous NSMutableDictionary access in AFHTTPRequestSerialiser Fixed crashes due to race conditions with NSMutableDictionary access in AFHTTPRequestSerialiser

Jun 6, 2016

@kcharwood kcharwood changed the title Fixed crashes due to race conditions with NSMutableDictionary access in AFHTTPRequestSerialiser Fixed crashes due to race conditions with NSMutableDictionary access in AFHTTPRequestSerializer

Oct 11, 2016

tmm1

@tmm1 tmm1 mentioned this pull request

Mar 9, 2017