llvm-project/lldb/unittests/Host
Michał Górny e8ee0f121d [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks
If lots of pending callbacks are added while the main loop has exited
already, the trigger pipe buffer fills in, causing the write to fail
and the related assertion to fail.  To avoid this, add a boolean member
indicating whether the callbacks have been triggered already.
If the trigger was done, avoid writing to the pipe until loops proceeds
to run them and resets the variable.

Besides fixing the issue, this also avoids writing to the pipe multiple
times if callbacks are added faster than the loop is able to process
them.  Previously, this would lead to the loop performing multiple read
iterations from pipe unnecessarily.

Sponsored by: The FreeBSD Foundation

Differential Revision: https://reviews.llvm.org/D135516
2022-10-17 17:48:44 +02:00
..
linux [lldb] Fix an include in HostTest.cpp 2021-10-15 11:10:38 +02:00
posix [lldb] Support serial port parity checking 2021-10-25 10:51:46 +02:00
CMakeLists.txt [lldb] Make CommunicationTest compatible with windows 2022-08-26 15:25:46 +02:00
ConnectionFileDescriptorTest.cpp [lldb] Make CommunicationTest compatible with windows 2022-08-26 15:25:46 +02:00
FileActionTest.cpp
FileSystemTest.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
FileTest.cpp [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
HostInfoTest.cpp Prevent GetAugmentedArchSpec() from attaching "unknown" environments 2022-04-04 08:56:58 -07:00
HostTest.cpp
MainLoopTest.cpp [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks 2022-10-17 17:48:44 +02:00
NativeProcessProtocolTest.cpp
PipeTest.cpp
ProcessLaunchInfoTest.cpp
SocketAddressTest.cpp
SocketTest.cpp [lldb] Make CommunicationTest compatible with windows 2022-08-26 15:25:46 +02:00
ThreadLauncherTest.cpp [lldb] Modernize ThreadLauncher 2022-02-23 14:25:59 +01:00
XMLTest.cpp [lldb] [Host] Refactor XML converting getters 2021-09-27 14:26:33 +02:00