================
@@ -587,18 +589,22 @@ struct StoppedExecutionContext : ExecutionContext {
StoppedExecutionContext(StoppedExecutionContext &&other)
: StoppedExecutionContext(other.m_target_sp, other.m_process_sp,
other.m_thread_sp, other.m_frame_sp,
- std::move(other.m_api_lock),
+ std::move(other.m_api_mutex),
std::move(other.m_stop_locker)) {
+ // Ownership already transferred above; don't let `other`'s destructor
+ // unlock the mutex `this` now owns.
+ other.m_api_locker.release();
----------------
JDevlieghere wrote:
It took me a bit to understand why this was necessary, but it's because we were
previously moving the locker and now we're moving the mutex, and reacquiring
the locker. I wonder if we shouldn't have a ctor overload that takes both so we
can move both and avoid this altogether. If not, it seems calling this out in
the comment.
https://github.com/llvm/llvm-project/pull/212872
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits