Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Issue 551713002: Fix a crash in SerialIoHandler. (Closed)

Created:
6 years, 3 months ago by Sam McNally
Modified:
6 years, 3 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M device/serial/serial_io_handler.cc View 2 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Sam McNally
6 years, 3 months ago (2014-09-08 01:20:23 UTC) #2
Ken Rockot(use gerrit already)
Ah, thanks for the explanation. lgtm
6 years, 3 months ago (2014-09-08 06:14:35 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/551713002/1
6 years, 3 months ago (2014-09-08 06:20:20 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1) as 3de8b570ea452a003c012f379e6f58de3aa8e422
6 years, 3 months ago (2014-09-08 07:14:41 UTC) #6
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:44:56 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/f4c09a1101b323c71862728bc86e882d67c1404b
Cr-Commit-Position: refs/heads/master@{#293684}

Powered by Google App Engine
This is Rietveld 408576698