We should probably outlaw the shared pointer from weak pointer constructor in lldb. It looks like the only safe way to use it is in a try/catch block (or by preflighting the weak pointer with lock which renders it pretty much pointless.)
Jim > On Sep 30, 2020, at 6:02 AM, Pavel Labath via Phabricator > <revi...@reviews.llvm.org> wrote: > > labath added a comment. > > In D88266#2302245 <https://reviews.llvm.org/D88266#2302245>, @jingham wrote: > >> Use std::weak_ptr::lock to make the shared pointer, rather than >> std::shared_ptr::shared_ptr(std::weak_ptr) (sort of), as the latter throws. > > Yep, `wp.lock()` behaves differently from the shared_ptr constructor. :) > > > 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