[all-commits] [llvm/llvm-project] 97beb8: [lldb][Windows] Don't stack a new ReadFile on a ti...

Charles Zablit via All-commits all-commits at lists.llvm.org
Fri Oct 2 08:16:27 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97beb893a52e1863d80bcb01c562316fbfce36c1
      https://github.com/llvm/llvm-project/commit/97beb893a52e1863d80bcb01c562316fbfce36c1
  Author: Charles Zablit <c_zablit at apple.com>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M lldb/source/Host/windows/ConnectionGenericFileWindows.cpp

  Log Message:
  -----------
  [lldb][Windows] Don't stack a new ReadFile on a timed-out one (#227759)

On Windows, `ConnectionGenericFile::Read` cleared `m_read_pending` when
a read was interrupted or timed out, even though its overlapped
`ReadFile` was still in flight.
The next Read then started a second ReadFile on the same OVERLAPPED and
buffer. When data finally arrived, both reads completed into one buffer
and the first part was lost. This made SwiftREPL tests like
`ExclusivityREPL` drop the first line of a program's output.

This patch makes it so an interrupted or timed-out read stays pending,
and the next Read waits on it. If it has already completed, Read
collects its result instead of blocking on an event that may have been
reset. Disconnect clears the pending state after `CancelIoEx`.

On a Windows PC with artificial 100% CPU usage, this reduced the failure
rate from 8/160 runs down to 0/160 runs.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list