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

Issue 1182123002: Fix bug in Dart_GetTypeOfExternalTypedData. (Closed)

Created:
5 years, 6 months ago by Florian Schneider
Modified:
5 years, 6 months ago
Reviewers:
koda, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix bug in Dart_GetTypeOfExternalTypedData. This API function would return true for typed data view objects, even if the view has a non-external data object underneath. It is used e.g. by Builtin_LoadSource. This function copies the data object for internal typed-data objects. When it wrongly be identifies a view as external, it consequently results in crash/undefined behavior because GC may interfere with this internal data pointer. BUG= R=asiva@google.com, koda@google.com Committed: https://github.com/dart-lang/sdk/commit/19bb19d7162cfae8e9fc1981fc12d8c75a2f83b0

Patch Set 1 #

Total comments: 1

Patch Set 2 : addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 1 chunk +12 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Florian Schneider
5 years, 6 months ago (2015-06-12 16:20:46 UTC) #2
koda
Please also add an ASSERT that the address of the typed data contents we hand ...
5 years, 6 months ago (2015-06-12 16:24:23 UTC) #3
koda
On 2015/06/12 16:24:23, koda wrote: > Please also add an ASSERT that the address of ...
5 years, 6 months ago (2015-06-12 16:26:00 UTC) #4
siva
lgtm https://codereview.chromium.org/1182123002/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/1182123002/diff/1/runtime/vm/dart_api_impl.cc#newcode3252 runtime/vm/dart_api_impl.cc:3252: const Instance& data_obj = Instance::Handle(TypedDataView::Data(view_obj)); Since isolate is ...
5 years, 6 months ago (2015-06-12 16:27:06 UTC) #5
Florian Schneider
5 years, 6 months ago (2015-06-12 16:41:12 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
19bb19d7162cfae8e9fc1981fc12d8c75a2f83b0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698