• Ulan Degenbaev's avatar
    [heap] Fix memory leak in the remembered set. · 163d3604
    Ulan Degenbaev authored
    Empty slot set buckets can leak in the following scenarios.
    
    Scenario 1 (large object space):
    1) A large array is allocated in the large object space.
    2) The array is filled with old->new references, which allocates new
       slot set buckets.
    3) The references are overwritten with smis or old space pointers, which
       make the slots set buckets empty.
    4) Garbage collection (scavenge or mark-compact) iterates the slots set
       of the array and pre-frees the empty buckets.
    5) Steps 2-4 repeated many times and leak arbitary many empty buckets.
    The fix to free empty buckets for large object space in mark-compact. 
    
    Scenario 2 (no mark-compact):
    1) A small array is allocated in the old space.
    2) The array is filled with old->new references, which allocates new
       slot set buckets.
    3) The references are overwritten with smis or old space pointers, which
       make the slots set buckets empty.
    4) Scavenge iterates the slots set of the array and pre-frees the empty
       buckets.
    5) Steps 2-4 repeated many times and leak arbitary many empty buckets.
    The fix to free empty buckets for swept pages in scavenger.
    
    Bug: v8:6800
    TBR: mlippautz@chromium.org
    Change-Id: I48d94870f5acf4f6208858271886911c895a9126
    Reviewed-on: https://chromium-review.googlesource.com/668442Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48041}
    163d3604
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...