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

Issue 181833004: Fix memory leak caused by treating Code::next_code_link as strong in marker. (Closed)

Created:
6 years, 9 months ago by ulan
Modified:
6 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix memory leak caused by treating Code::next_code_link as strong in marker. BUG= TEST=test/cctest/NextCodeLinkIsWeak R=mstarzinger@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=19897

Patch Set 1 #

Patch Set 2 : fix test #

Total comments: 8

Patch Set 3 : Re-implement using special visitor method #

Patch Set 4 : Comments #

Patch Set 5 : Add test #

Patch Set 6 : Fix constant #

Total comments: 2

Patch Set 7 : Fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -17 lines) Patch
M src/heap.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 chunks +7 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 3 chunks +6 lines, -14 lines 0 comments Download
M src/objects-visiting.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects-visiting-inl.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M test/cctest/test-heap.cc View 1 2 3 4 5 6 1 chunk +95 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
ulan
PTAL, discovered this leak while investigating an unrelated crash. WDYT about introducing weak_pointer_mode to visitors? ...
6 years, 9 months ago (2014-03-01 13:07:14 UTC) #1
Michael Starzinger
Nice catch. Just two suggestions. https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h File src/objects-visiting-inl.h (right): https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h#newcode936 src/objects-visiting-inl.h:936: !is_optimized_code()) { As discussed ...
6 years, 9 months ago (2014-03-04 12:31:11 UTC) #2
titzer
https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h File src/objects-visiting-inl.h (right): https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h#newcode936 src/objects-visiting-inl.h:936: !is_optimized_code()) { On 2014/03/04 12:31:12, Michael Starzinger wrote: > ...
6 years, 9 months ago (2014-03-05 08:58:02 UTC) #3
ulan
Un-overlapped and added VisitCodeNextPointer, PTAL. https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h File src/objects-visiting-inl.h (right): https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h#newcode936 src/objects-visiting-inl.h:936: !is_optimized_code()) { On 2014/03/05 ...
6 years, 9 months ago (2014-03-06 11:13:32 UTC) #4
titzer
On 2014/03/06 11:13:32, ulan wrote: > Un-overlapped and added VisitCodeNextPointer, PTAL. > > https://codereview.chromium.org/181833004/diff/20001/src/objects-visiting-inl.h > ...
6 years, 9 months ago (2014-03-06 11:29:33 UTC) #5
ulan
> Agree with your above statement. But it's easy just to have two tests. Done.
6 years, 9 months ago (2014-03-06 12:19:30 UTC) #6
Michael Starzinger
LGTM with one comment. https://codereview.chromium.org/181833004/diff/120001/src/mark-compact.cc File src/mark-compact.cc (right): https://codereview.chromium.org/181833004/diff/120001/src/mark-compact.cc#newcode1864 src/mark-compact.cc:1864: void VisitNextCodeLink(Object** p) { } ...
6 years, 9 months ago (2014-03-06 13:43:51 UTC) #7
ulan
Thanks for review, landing. https://codereview.chromium.org/181833004/diff/120001/src/mark-compact.cc File src/mark-compact.cc (right): https://codereview.chromium.org/181833004/diff/120001/src/mark-compact.cc#newcode1864 src/mark-compact.cc:1864: void VisitNextCodeLink(Object** p) { } ...
6 years, 9 months ago (2014-03-13 14:06:51 UTC) #8
ulan
6 years, 9 months ago (2014-03-13 14:09:27 UTC) #9
Message was sent while issue was closed.
Committed patchset #7 manually as r19897 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698