[Lldb-commits] [lldb] [lldb][windows] prevent IOHandlerProcessSTDIOWindows from consuming non text inputs (PR #175812)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 19 09:34:04 PST 2026
================
@@ -993,6 +996,27 @@ class IOHandlerProcessSTDIOWindows : public IOHandler {
case WAIT_FAILED:
goto exit_loop;
case WAIT_OBJECT_0: {
+ if (isConsole) {
+ while (true) {
+ INPUT_RECORD inputRecord;
+ DWORD numRead = 0;
+ if (!PeekConsoleInput(hStdin, &inputRecord, 1, &numRead) ||
+ numRead == 0)
+ goto exit_loop;
----------------
charles-zablit wrote:
I added an additional `if (nRead == 0)`. I think this should never happen because `WaitForMultipleObjects` means there is data in the pipe right? I will take another look at this tomorrow with a fresh eye.
https://github.com/llvm/llvm-project/pull/175812
More information about the lldb-commits
mailing list