• Wez's avatar
    Reland "Delay Channel::OnError() in case of kDisconnected during Write()." · 3e64a8a0
    Wez authored
    This is a reland of e9605182
    
    The original CL added a unit-test which created a single-byte
    Channel::Message, without actually initializing that single-byte. This
    caused the MSAN bots to (correctly) spot that uninitialized data was
    being read during serialization.
    
    Original change's description:
    > Delay Channel::OnError() in case of kDisconnected during Write().
    >
    > Write() operations to a Channel can fail due to the peer having closed
    > it, while there are still messages waiting to be read from it. We must
    > therefore defer notifying the caller of the Channel::Error until we
    > observe end-of-stream via a readable notification, otherwise those
    > messages may be dropped (depending on whether the posted OnError task
    > is processed before or after a pending Channel-readable event).
    >
    > Bug: 816620
    > Change-Id: I75bd34a48edf4022809d27ce49f9cfba7a5d4daf
    > Reviewed-on: https://chromium-review.googlesource.com/956932
    > Commit-Queue: Wez <wez@chromium.org>
    > Reviewed-by: Ken Rockot <rockot@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#542634}
    
    TBR: rockot
    Bug: 816620
    Change-Id: I1a1d6eb7fa712e50b3d9c86591878900f0aeb388
    Reviewed-on: https://chromium-review.googlesource.com/959762Reviewed-by: default avatarWez <wez@chromium.org>
    Commit-Queue: Wez <wez@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#542739}
    3e64a8a0
channel_fuchsia.cc 15.5 KB