labath added a comment.
I don't believe this solution is correct.
How did this work before? Is it because `ObjectFileELF::GetSymtab` contained
the same (incorrect) unique_ptr pattern?
How about we just prime the symtab (or whatever is needed) before we start the
thread pool indexing?
================
Comment at: lldb/source/Symbol/ObjectFile.cpp:723
+Symtab *ObjectFile::GetSymtab() {
+ // std::unique_ptr is thread safe to access. If it is already set, then we
+ // can hand out the existing pointer. The symbol table has it's own mutex
----------------
This is not true. unique_ptr makes no guarantees about the safety of concurrent
accesses to a single unique_ptr object. While this may work on current hardware
(it will most likely work on x86), it will make tsan very unhappy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114288/new/
https://reviews.llvm.org/D114288
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits