[PATCH] D33325: [asan] Avoid possible deadlock in child process after fork

Maxim Ostapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 13:58:13 PDT 2017


m.ostapenko added a comment.

In https://reviews.llvm.org/D33325#759703, @eugenis wrote:

> Good catch. This is a problem for MSan as well, is not it? Do you mind fixing it in both tools?


Sure, we can fix it for all sanitizers if the problem exists, I'll check this more carefully. FWIW I've run the attached testcase with MSan and TSan, but it didn't hang (as opposed to ASan). Do they use allocator caches (that can lock on refilling)?

> For bonus points, TSan. I see it locks something
>  void ForkBefore(ThreadState *thr, uptr pc) {
> 
>   ctx->thread_registry->Lock();
>   ctx->report_mtx.Lock();
> 
> }
> 
> But again, not the allocator.




Repository:
  rL LLVM

https://reviews.llvm.org/D33325





More information about the llvm-commits mailing list