labath added a comment.
These kinds of changes rarely fix a bug -- usually they just change a
(detectable) data race into some nondeterministic runtime behavior.
That's because, even though e.g. `IsActive` can compute its result in a
race-free manner, there's nothing preventing someone from invalidating it one
nanosecond after the function returns (and before anyone manages to act on it).
And if it isn't possible for someone to concurrently change the values that
IsActive depends on, then we wouldn't have a data race in the first place.
Most of the time, that means the result of the function is useless. I haven't
checked tried (yet) to figure out how could that problem manifest itself in
this case (the iohandler logic is fairly complex), but I'm pretty sure that
this should be fixed at a higher level.
================
Comment at: lldb/source/Target/Process.cpp:4396
bool Interrupt() override {
// Do only things that are safe to do in an interrupt context (like in a
// SIGINT handler), like write 1 byte to a file descriptor. This will
----------------
Locking a mutex in a signal handler is not usually safe.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120762/new/
https://reviews.llvm.org/D120762
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits