[ORC-RT][MachO] Unlock JDStatesMutex during push-initializers to avoid deadlock.

During __orc_rt_macho_jit_dlopen the ORC runtime will make a request to the JIT
to push any new initializers. Since this call may add new JD-state to the
runtime (and is expected to in general) we need to unlock the JDStatesMutex
during this operation (and similarly when running initializers and atexits, as
these may call trigger push-initializers recursively).

No testcase yet: I haven't been able to reproduce the deadlock when running
llvm-jitlink in in-process mode, and we don't support out-of-process mode in
regression tests yet.

GitOrigin-RevId: e7707464a3f7bf0c6011809d80d0a6e525be184b
1 file changed