clayborg requested changes to this revision. clayborg added inline comments. This revision now requires changes to proceed.
================ Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:335 m_die_array.swap(tmp_array); - if (keep_compile_unit_die) + m_die_array_size_atomic = 0; + if (keep_compile_unit_die) { ---------------- You can't really play with the m_die_array_size_atomic without locking the mutex, which really means m_die_array_size_atomic is not very useful. Seems like there is still a race condition: - thread 1 calls this function and executes "m_die_array.swap(tmp_array);" but not " m_die_array_size_atomic = 0;" - thread 2 calls DWARFUnit::ExtractDIEsIfNeeded() and calls "already_parsed()" which returns true because m_die_array_size_atomic is still some valid value - thread 1 clears the DIE array and sets m_die_array_size_atomic to zero - thread 2 has no DIEs when it tries to use them https://reviews.llvm.org/D40470 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits