jingham added inline comments.
================ Comment at: lldb/include/lldb/Core/StructuredDataImpl.h:72-74 + lldb::StructuredDataPluginSP plugin_sp; + if (!m_plugin_wp.expired()) + plugin_sp = lldb::StructuredDataPluginSP(m_plugin_wp); ---------------- labath wrote: > This is racy. The right way to do that is to call `m_plugin_wp.lock()` and > then check the validity of the returned shared_ptr. I tried that, but at least on the version of the STL on the latest macOS if the weak pointer has just been default initialized if you call lock on it it crashes. expired was the only call I could make that didn't crash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88266/new/ https://reviews.llvm.org/D88266 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits