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

Issue 792163003: Deletion barrier preparation: validate overwritten references. (Closed)

Created:
6 years ago by koda
Modified:
5 years, 11 months ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Deletion barrier preparation: validate overwritten references. With the upcoming deletion barrier, every update of a pointer field must know whether the previous value was a valid pointer. Currently, we always use StorePointer/StoreSmi, both for initialization and updates. Initialization, and thus the potential for overwriting garbage values, appears in three places: 1. Object::Allocate/Foo::New. 2. Creating isolate from full snapshot. 3. Allocation in generated code. Case 1 already null-initializes all underlying memory. Case 2 is addressed by this CL by exploiting that: i) fresh pages are zero-filled by OS, and ii) freelist headers use only even values. Case 3 is remains a TODO for future CLs. (An alternative solution for case 2 would have been to add an init_foo method for every set_foo called.) R=iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=42584

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -16 lines) Patch
M runtime/vm/freelist.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/freelist.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/pages.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/pages.cc View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 3 4 5 6 4 chunks +28 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 4 5 6 2 chunks +5 lines, -13 lines 0 comments Download
M runtime/vm/virtual_memory.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/virtual_memory_test.cc View 1 2 3 4 5 6 3 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
koda
6 years ago (2014-12-10 22:08:32 UTC) #1
Ivan Posva
https://codereview.chromium.org/792163003/diff/80001/runtime/vm/pages.cc File runtime/vm/pages.cc (right): https://codereview.chromium.org/792163003/diff/80001/runtime/vm/pages.cc#newcode886 runtime/vm/pages.cc:886: // Shouldn't happen, but prefer slight slowdown over (exploitable?) ...
5 years, 11 months ago (2015-01-02 17:09:39 UTC) #2
koda
PTAL https://codereview.chromium.org/792163003/diff/80001/runtime/vm/pages.cc File runtime/vm/pages.cc (right): https://codereview.chromium.org/792163003/diff/80001/runtime/vm/pages.cc#newcode886 runtime/vm/pages.cc:886: // Shouldn't happen, but prefer slight slowdown over ...
5 years, 11 months ago (2015-01-02 17:30:53 UTC) #3
Ivan Posva
And that should have had a LGTM with the previous comments... -Ivan
5 years, 11 months ago (2015-01-02 18:07:53 UTC) #4
koda
5 years, 11 months ago (2015-01-02 18:16:21 UTC) #5
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as r42584 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698