-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Looking at the code without prior knowledge of Windows system call semantics, I see an infinite loop if the syscall were to fill up the buffer exactly: when k == n on line 195, the loop will be rerun with no changes, which should result in the exact same outcome if the syscall is idempotent.
Even if Windows guarantees in some way that this cannot happen, would it not be clearer to handle this case in an obvious fashion?
Metadata
Metadata
Assignees
Labels
O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.