I am experiencing strange crashes in my (ObjC) code, that insinuate some memory corruption (mostly running SHA256 decryption for file data
in my code there's a
// return object that was stored in encrypted file
- (id) objectFromEncryptedFile:(NSString *)filePath
{
// read MYCrypto object that includes encrypted object of any class
MYCrypto *encData = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath];
// decrypt, unarchive and return
return [encData objectFromEncryptedData:encData.data];
}
That seems to be called from different queues that are not synchronized.
It came to me that maybe NSKeyedUnarchiver is not "thread safe" and maybe unarchiveObjectWithFile is not reentrant?
Couldn't find anything in the normal documentation, but most of the old docs are no longer searchable.
Can someone shed light on this?