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

Issue 10830049: Implement verification of context separation. (Closed)

Created:
8 years, 5 months ago by Michael Starzinger
Modified:
8 years, 4 months ago
Reviewers:
Toon Verwaest
CC:
v8-dev
Visibility:
Public.

Description

Implement verification of context separation. This adds the --verify-global-context-separation flag which can be used to verify that no code object embeds pointers to more than one global context after a full GC. It uses an object visitor that just performs shallow traversal of the object graph spanned by one code object, and breaks at points where application objects are encountered. So it will not trip on cross-context leaks introduced by the application itself. R=verwaest@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=12224

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments by Toon Verwaest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -1 line) Patch
M src/flag-definitions.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/mark-compact.cc View 1 2 chunks +99 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
8 years, 5 months ago (2012-07-27 09:09:47 UTC) #1
Toon Verwaest
lgtm with comments. https://chromiumcodereview.appspot.com/10830049/diff/1/src/flag-definitions.h File src/flag-definitions.h (right): https://chromiumcodereview.appspot.com/10830049/diff/1/src/flag-definitions.h#newcode556 src/flag-definitions.h:556: "verify that code embeds at most ...
8 years, 4 months ago (2012-07-30 10:09:38 UTC) #2
Michael Starzinger
8 years, 4 months ago (2012-07-30 10:44:32 UTC) #3
Addressed comments. Landing.

https://chromiumcodereview.appspot.com/10830049/diff/1/src/flag-definitions.h
File src/flag-definitions.h (right):

https://chromiumcodereview.appspot.com/10830049/diff/1/src/flag-definitions.h...
src/flag-definitions.h:556: "verify that code embeds at most one global context
after GC")
On 2012/07/30 10:09:38, Toon Verwaest wrote:
> embeds -> holds on to?

Done.

https://chromiumcodereview.appspot.com/10830049/diff/1/src/mark-compact.cc
File src/mark-compact.cc (right):

https://chromiumcodereview.appspot.com/10830049/diff/1/src/mark-compact.cc#ne...
src/mark-compact.cc:264: array->set_length(0);
On 2012/07/30 10:09:38, Toon Verwaest wrote:
> Adding a comment here is probably useful. Why do we need this trick here but
> don't we handle objects specially? Can't we use the same mechanism for arrays
as
> we do for objects somehow?

Done. For JSObjects we don't have the problem, because we don't iterate over
their bodies. The external mark bits cannot be used because of lazy sweeping. We
could use intrusive marking, but that would make this visitor much more
complicated.

Powered by Google App Engine
This is Rietveld 408576698