You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
No attempt is made to cancel a pending overlapped operation (e.g. using CancelIoEx) before the buffer it is writing into is dropped.
As an example, try to read from a pipe into a buffer, timeout, the buffer goes away, and later the read finishes. The read will write into the space where the buffer had been.
In the example below function f can run two ways (done this way in order to put another instance of buf in the same place): First it tries to read, which times out. Second it just sleeps, and then asserts that buf hasn't changed.
The events:
Start of first buf lifetime
0ms: Start read
10ms: Read timeout
End of first buf lifetime
10ms+: Begin sleep
100ms: Write from main thread, read writes into first buf which is now second buf
210ms: Check second buf
No attempt is made to cancel a pending overlapped operation (e.g. using
CancelIoEx
) before the buffer it is writing into is dropped.As an example, try to read from a pipe into a buffer, timeout, the buffer goes away, and later the read finishes. The read will write into the space where the buffer had been.
In the example below function
f
can run two ways (done this way in order to put another instance ofbuf
in the same place): First it tries to read, which times out. Second it just sleeps, and then asserts thatbuf
hasn't changed.The events:
Start of first
buf
lifetime0ms: Start read
10ms: Read timeout
End of first
buf
lifetime10ms+: Begin sleep
100ms: Write from main thread, read writes into first
buf
which is now secondbuf
210ms: Check second
buf
The text was updated successfully, but these errors were encountered: