aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-08 18:25:49 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-17 17:48:44 +0200
commite8ee0f121dbc2dc20a9de326531c4d4d061a20d8 (patch)
treecc086646c8ef6369900a7c3b2c794d22adf12c68 /llvm/lib/CodeGen/MachineFunction.cpp
parent7712ae0a02da98b5c028af7be769a8aef99f83e3 (diff)
downloadllvm-e8ee0f121dbc2dc20a9de326531c4d4d061a20d8.zip
llvm-e8ee0f121dbc2dc20a9de326531c4d4d061a20d8.tar.gz
llvm-e8ee0f121dbc2dc20a9de326531c4d4d061a20d8.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions