DescriptionFix a crash in SerialIoHandler.
When a receive error occurs, the SerialConnection pauses receives, which
triggers a call to CancelRead(). This should be a no-op as this occurs
after the previous read completed with an error, but
pending_read_buffer_ isn't cleared until after the error is reported to
SerialConnection. Thus, on posix, a call to ReadDone is enqueued, but
the pending read is cleared before it runs, leading to a crash. This
change clears pending_read_buffer_ and pending_write_buffer_ before
calling Done() or DoneWithError().
BUG=410331
Committed: https://crrev.com/f4c09a1101b323c71862728bc86e882d67c1404b
Cr-Commit-Position: refs/heads/master@{#293684}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|