https://github.com/labath closed https://github.com/llvm/llvm-project/pull/98293
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
labath wrote:
> LGTM.
>
> As a nice to have, maybe add a short explanation to the first mutex
> explaining that these operations are only allowed between thread lists
> belonging to the same process. Your current comment makes it sound as if that
> only applies _if_ the processes are the same
https://github.com/labath updated
https://github.com/llvm/llvm-project/pull/98293
>From 0a594fea0a5db3ebc8de74edbcd051cbac911697 Mon Sep 17 00:00:00 2001
From: Pavel Labath
Date: Wed, 10 Jul 2024 04:06:42 +0200
Subject: [PATCH 1/2] [lldb] Fix ThreadList assignment race
ThreadList uses the Proc
@@ -27,12 +27,13 @@ class ThreadList : public ThreadCollection {
friend class Process;
public:
- ThreadList(Process *process);
+ ThreadList(Process &process);
ThreadList(const ThreadList &rhs);
~ThreadList() override;
+ // Precondition: both thread lists must
@@ -736,11 +734,12 @@ void ThreadList::NotifySelectedThreadChanged(lldb::tid_t
tid) {
void ThreadList::Update(ThreadList &rhs) {
if (this != &rhs) {
-// Lock both mutexes to make sure neither side changes anyone on us while
-// the assignment occurs
-std::scoped
https://github.com/JDevlieghere edited
https://github.com/llvm/llvm-project/pull/98293
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/JDevlieghere approved this pull request.
LGTM.
As a nice to have, maybe add a short explanation to the first mutex explaining
that these operations are only allowed between thread lists belonging to the
same process. Your current comment makes it sound as if that only appli
labath wrote:
Previous attempt to fix this issue: https://reviews.llvm.org/D158034
https://github.com/llvm/llvm-project/pull/98293
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Pavel Labath (labath)
Changes
ThreadList uses the Process mutex to guard its state. This means its not
possible to safely modify its process member, as the member is required to lock
the mutex.
Fortunately for us, we never actually need t
https://github.com/labath created
https://github.com/llvm/llvm-project/pull/98293
ThreadList uses the Process mutex to guard its state. This means its not
possible to safely modify its process member, as the member is required to lock
the mutex.
Fortunately for us, we never actually need to c
10 matches
Mail list logo