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

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 19 15:30:08 PDT 2019

xiaobai created this revision.
xiaobai added reviewers: JDevlieghere, clayborg, davide, labath, jingham.

Relying on m_clear_in_progress is dangerous for modifying m_map. It's
entirely possible for one thread to invoke TypeSystemMap::Clear(), lock
the mutex, and copy the map for finalization while another thread tries
to add a new type system. This could end up in a situation where a type
system isn't finalized because of unsynchronized access.

I propose we remove the `m_clear_in_progress` variable entirely and rely
on the mutex.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65025.210916.patch
Type: text/x-patch
Size: 3517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190719/a5386d60/attachment.bin>

More information about the lldb-commits mailing list