[compiler-rt] [tsan] Fix deadlock with dyld during symbolization on darwin platforms (PR #113661)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 03:02:19 PST 2024


pudge62 wrote:

>> I removed the ScopedErrorReportLock in ScopedReport class

> Why was it needed/why is not it needed anymore?
> Things were these on a purpose generally.

> > I found my changes introduced another deadlock

> Why wasn't it detected before by the internal deadlock detector? It should have been warned on any unit test that exercises that code.
> 

I believe the `ScopedErrorReportLock` was originally used to make the entire reporting process atomic. However, I have now divided the process into separate steps, rendering it unnecessary. Additionally, the new deadlock introduced by my previous changes was also related to `ScopedErrorReportLock`. This occurred because it was initially locked exclusively in the `ReportRace` function, whereas in other situations, the `ThreadRegistryLock` might be locked first.

Regarding the internal deadlock detector, are you referring to `sanitizer_deadlock_detector1.cpp`? It can't detect deadlocks within the runtime, right?


https://github.com/llvm/llvm-project/pull/113661


More information about the llvm-commits mailing list