1916a7ed08
Avoids using objc runtime for termination handling if illegal sharing is detected in _tryRetain, and adds a test for it. ObjC runtime uses shared non-recursive locks for object lifetime management methods, which include _tryRetain and object destruction. There are several locks per runtime divided between groups of objects based on their addresses. _tryRetain takes a lock, and if we terminate with unhandled exception inside its stack, we are not allowed to make ObjC runtime to destruct any object, because that object may take the same lock and consequently fail since locks are not recursive. Therefore, avoid touching ObjC runtime when terminating inside _tryRetain. This includes avoiding using ObjC's default unhandled exception handler, and our own usage of CoreSymbolication framework.