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

Issue 23532048: Checks for valid CObject lengths in native API. (Closed)

Created:
7 years, 3 months ago by Michael Lippautz (Google)
Modified:
7 years, 3 months ago
Reviewers:
Søren Gjesse, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Checks CObject lengths in native API. Also converts the API to use intptr_t instead of a mixture of int64_t and int. Internally all variable length objects have lengths and maximum values represented as intptr_t (actually Smi ranges). In order to check for these maximum lengths we need to have a common type for 32 and 64 bit platforms. Helping constructs like IOBuffer can still use 64bit lengths, but have to check that there values are actually in the domain of intptr_t as soon as internal objects are created. Addresses issue 4314. BUG= R=asiva@google.com, sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=27395

Patch Set 1 #

Patch Set 2 : Redo buffer changes #

Total comments: 4

Patch Set 3 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -30 lines) Patch
M runtime/bin/dartutils.h View 1 5 chunks +14 lines, -11 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 5 chunks +13 lines, -5 lines 0 comments Download
M runtime/bin/file.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/include/dart_native_api.h View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/dart_api_message.cc View 9 chunks +48 lines, -11 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 2 chunks +61 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Michael Lippautz (Google)
Includes changes from https://codereview.chromium.org/23479010/ Previously the length attribute of CObject was int and set from ...
7 years, 3 months ago (2013-09-09 19:45:53 UTC) #1
siva
In your CL comments can you elaborate on the need for this conversion : "Also ...
7 years, 3 months ago (2013-09-09 22:49:57 UTC) #2
siva
lgtm https://codereview.chromium.org/23532048/diff/4001/runtime/bin/dartutils.cc File runtime/bin/dartutils.cc (right): https://codereview.chromium.org/23532048/diff/4001/runtime/bin/dartutils.cc#newcode972 runtime/bin/dartutils.cc:972: if (length > kIntptrMax) { I thought you ...
7 years, 3 months ago (2013-09-09 22:56:58 UTC) #3
Michael Lippautz (Google)
Updated CL description and addressed comments. https://codereview.chromium.org/23532048/diff/4001/runtime/bin/dartutils.cc File runtime/bin/dartutils.cc (right): https://codereview.chromium.org/23532048/diff/4001/runtime/bin/dartutils.cc#newcode972 runtime/bin/dartutils.cc:972: if (length > ...
7 years, 3 months ago (2013-09-09 23:14:40 UTC) #4
Søren Gjesse
lgtm
7 years, 3 months ago (2013-09-11 07:23:03 UTC) #5
Michael Lippautz (Google)
7 years, 3 months ago (2013-09-11 16:57:06 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 manually as r27395 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698