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

Issue 132173003: Mojo: Fix possibly-invalid vector subscripting in RawChannelPosix. (Closed)

Created:
6 years, 11 months ago by viettrungluu
Modified:
6 years, 11 months ago
CC:
chromium-reviews, Aaron Boodman, darin (slow to review), viettrungluu+watch_chromium.org, ben+mojo_chromium.org, abarth-chromium
Visibility:
Public.

Description

Mojo: Fix possibly-invalid vector subscripting in RawChannelPosix. In RawChannelPosix::OnFileCanReadWithoutBlocking()'s call to memmove(), read_buffer_start may point one past the end of the buffer. This isn't a "real" problem, since in that case read_buffer_num_valid_bytes_ will be zero, but it's illegal to subscript a vector with an invalid index and an assertion fails in Debug builds (an alternate fix would be to replace &read_buffer_[read_buffer_start] with &read_buffer_[0] + read_buffer_start). The bug was exhibited by the flakily-failing MultiprocessMessagePipeTest.QueueMessages (in Debug builds), so to test run: out/Debug/mojo_system_unittests \ --gtest_filter=MultiprocessMessagePipeTest.QueueMessages \ --gtest_repeat=-1 --single-process-tests R=darin@chromium.org BUG=329622 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244194

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M mojo/system/raw_channel_posix.cc View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
viettrungluu
6 years, 11 months ago (2014-01-09 18:46:04 UTC) #1
darin (slow to review)
LGTM On Jan 9, 2014 10:46 AM, <viettrungluu@chromium.org> wrote: > Reviewers: darin, > > Description: ...
6 years, 11 months ago (2014-01-09 21:34:55 UTC) #2
viettrungluu
6 years, 11 months ago (2014-01-10 17:49:59 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 manually as r244194 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698