Fix objc message logging for 64-bit code

The Objective-C runtime version 2 (used for non-32-bit architectures)
added a runtime lock. This lock is always taken before the message log
lock, but the lockdebug subsystem wasn't made aware of this; because of
this, it would throw an error saying the lock order wasn't defined.
Let's define it so it can calm down.
This commit is contained in:
Ariel Abreu 2023-10-07 11:06:34 -04:00
parent cd4190c784
commit 1a12df76d1
No known key found for this signature in database
GPG Key ID: 5B88AAAF4280706F

View File

@ -776,6 +776,10 @@ static void defineLockOrder()
lockdebug_lock_precedes_lock(&classInitLock, &runtimeLock);
#endif
#if __OBJC2__ && defined(DARLING)
lockdebug_lock_precedes_lock(&runtimeLock, &objcMsgLogLock);
#endif
#if __OBJC2__
// Runtime operations may occur inside SideTable locks
// (such as storeWeak calling getMethodImplementation)