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

Issue 9560001: Guard calls to ByteAddr when a ByteArray copy length is 0. (Closed)

Created:
8 years, 9 months ago by cshapiro
Modified:
8 years, 9 months ago
Reviewers:
turnidge
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Guard calls to ByteAddr when a ByteArray copy length is 0. It is permitted to specify a start index equal to the array length when the copy length is 0. This runs afoul of an assertion in ByteAddr that validates 0 <= index < length. Consistent with other methods to retrieve a raw element address, we now guard this call with an implicit check for this boundary condition by ensuring length is greater than zero. In addition, some simple unit tests for ByteArray::Copy have been added. BUG=1891 Committed: https://code.google.com/p/dart/source/detail?r=4772

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -3 lines) Patch
M runtime/vm/object.cc View 3 chunks +9 lines, -3 lines 0 comments Download
M runtime/vm/object_test.cc View 2 chunks +198 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
cshapiro
8 years, 9 months ago (2012-02-29 23:11:46 UTC) #1
turnidge
8 years, 9 months ago (2012-02-29 23:14:42 UTC) #2
turnidge
8 years, 9 months ago (2012-03-01 00:12:29 UTC) #3
lgtm

Powered by Google App Engine
This is Rietveld 408576698