DescriptionLast set of fixes to make the src/mojo/edk pass the page cycler.
-remove the different code paths in RawChannelWin for using IOCP or manual reset. We know we definitely can't use the former. The latter is too slow and we know for sure now that auto-reset works.
-after calling CancelIO(Ex) synchronously wait for the result. Otherwise we would sometimes miss notification that a page was read, leading to gaps in in data read from the pipes.
-call RegisterWaitForSingleObject directly instead of using ObjectWatcher, to make the above possible. It would have made the API for ObjectWatcher too ugly to add this support there.
-ensure that if there's a pending post task to set the error state, it is serialized as well. otherwise the consumer of the mojo primitive will never see a peer-closed signal, leading to hangs.
-ensure we don't call the delegate's OnError more than once. this could lead to UAFs.
-ensure that the read/write lock are acquired before modifying pending_read_/pending_write_, otherwise there are races where the IO thread set it to false before calling into RawChannel::OnReadCompleted/OnWriteCompleted, and ReleaseHandle didn't see that there was pending IO
BUG=478251
Committed: https://crrev.com/447c7923b1b92c978f5dc594939b407d6c4686c2
Cr-Commit-Position: refs/heads/master@{#354191}
Patch Set 1 #Patch Set 2 : fix assert in debug builds #Patch Set 3 : another small fix #
Total comments: 7
Patch Set 4 : undo code that called OnError only once #
Total comments: 2
Patch Set 5 : fixes now that OnError can be called multiple times #
Total comments: 6
Patch Set 6 : nit #
Messages
Total messages: 15 (4 generated)
|