[PATCH] D51319: Use a RAII guard to control access to DisassemblerLLVMC.

Raphael Isemann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 08:39:40 PDT 2018


teemperor added inline comments.


================
Comment at: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp:176
     bool got_op = false;
-    std::shared_ptr<DisassemblerLLVMC> disasm_sp(GetDisassembler());
-    if (disasm_sp) {
-      const ArchSpec &arch = disasm_sp->GetArchitecture();
+    DisassemblerScope disasm(*this);
+    if (disasm) {
----------------
vsk wrote:
> Were all callers into Decode locking the disasm instance prior to this patch? If not, this is a sweet fix.
Not from what I can see. Otherwise I would have seen deadlocks when adding this lock here.


Repository:
  rL LLVM

https://reviews.llvm.org/D51319





More information about the llvm-commits mailing list