[Lldb-commits] [PATCH] D65025: [Symbol] Improve TypeSystemMap mutex safety

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 22 07:22:34 PDT 2019


clayborg added a comment.

I fear this will deadlock again now. The original reason for the m_clear_in_progress was:

> r260624 | jingham | 2016-02-11 16:03:19 -0800 (Thu, 11 Feb 2016) | 14 lines
> 
> When calling TypeSystemMap::Clear, objects being destroyed in the process of 
>  clearing the map ended up calling back into the TypeSystemMap to do lookups.  
>  Not a good idea, and in this case it would cause a deadlock.
> 
> You would only see this when replacing the target contents after an exec, and only if you 
>  had stopped before the exec, evaluated an expression, then continued
>  on to the point where you did the exec.
> 
> Fixed this by making sure the TypeSystemMap::Clear tears down the TypeSystems in the map before clearing the map.
>  I also add an expression before exec to the TestExec.py so that we'll catch this
>  issue if it crops up again in the future.
> 
> rdar://problem/24554920




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65025/new/

https://reviews.llvm.org/D65025





More information about the lldb-commits mailing list