https://github.com/labath commented:

I think there's a race in the cancellation handling:
1. request handling thread sets active_seq (but doesn't start executing the 
request yet)
2. cancellation request comes in, queue_reader sets the interrupt flag
3. request handling thread begins handling the request, starts by clearing the 
flag
4. request is not cancelled

I think this would be easier to guarantee correctness (and review) if 
`active_seq` was *not* an atomic and its modification, as well as the acts of 
setting and clearing the interrupt flag were done under a mutex

https://github.com/llvm/llvm-project/pull/130169
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to