mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
f62b9d12ef
In MachOPlatform, obtaining the link-order for a JITDylib requires locking the session, but also needs to be part of a larger atomic operation that collates initializer symbols tracked by the platform. Trying to do this under a separate platform mutex leads to potential locking order issues, e.g. T1 locks session then tries to lock platform to register a new init symbol meanwhile T2 locks platform then tries to lock session to obtain link order. Removing the platform lock and performing all these operations under the session lock eliminates this possibility. At the same time we also need to collate init pointers from the MachOPlatform::InitScraperPlugin, and we don't need or want to lock the session for that. The new InitSeqMutex has been added to guard these init pointers, and the session mutex is never obtained while the InitSeqMutex is held. |
||
---|---|---|
.. | ||
llvm | ||
llvm-c |