[TSan] Fix deadlocks during TSan error reporting on Apple platforms (#151495)
Changes:
Apple only:
* Move OutputReport (and thus symbolization) after the locked region when reporting.
* ScopedReportBase constructor requires the thread_registry lock to be held, so the regions where ScopedReports get created must be inside the locked region.
* Bail early from MemoryAccess if we are symbolizing.
Other platforms should behave as before, outputting reports while the locks are held.
This is a follow up to https://github.com/llvm/llvm-project/pull/151120,
which delayed symbolization of ScopedReports.
rdar://152829396
GitOrigin-RevId: cb1f1a703b5c90921f57315ddb395e7ad9cce756
7 files changed