v8/test
Ulan Degenbaev 0640cbf378 [heap] Rework ASLR for base::Platform::VirtualMemory
Currently every VirtualMemory allocation on 64-bit systems
uses a random 46-bit address hint for ASLR.

This leads to wired page leak on MacOS discovered by Erik Chen (see
crbug.com/700928 and https://chromium-review.googlesource.com/c/557958/):
"The Darwin kernel [as of macOS 10.12.5] does not clean up page directory
entries [PDE] created from mmap or mach_vm_allocate, even after
the region is destroyed. Using a virtual address space that is too large
causes a leak of about 1 wired [can never be paged out] page per call to
mmap(). The page is only reclaimed when the process is killed."

This patch changes VirtualMemory to accept the hint parameter explicitly.

On MacOS the hints are confined to 4GB contiguous region. Algorithm:
- On startup, set heap.mmap_region_base_ to a random address.
- For each mmap use heap.mmap_region_base_ + (random_offset % (4*GB)).

BUG=chromium:700928

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2ae6a024e02fbe63f940105d7920b57c19abacc6
Reviewed-on: https://chromium-review.googlesource.com/558876
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46656}
2017-07-14 07:15:40 +00:00
..
benchmarks Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
cctest [heap] Rework ASLR for base::Platform::VirtualMemory 2017-07-14 07:15:40 +00:00
common Revert "[wasm] Don't store global handles in the interpreter" 2017-07-13 11:04:36 +00:00
debugger [cleanup] Remove always-off support for tail calls 2017-07-13 19:29:05 +00:00
fuzzer [wasm] [fuzzer] Also test validation 2017-07-11 13:43:32 +00:00
inspector [Interpreter] Replace --ignition flag with a --stress-fullcodegen 2017-07-13 13:05:00 +00:00
intl [tests] Fix timezone dependence in an intl test 2017-07-12 12:23:22 +00:00
js-perf-test Add js-perf-test to exercise v8_inspector::String16 2017-07-13 00:22:02 +00:00
memory
message [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
mjsunit [turbofan] Inline Map and Set iterators into optimized code. 2017-07-14 07:02:00 +00:00
mkgrokdump Fix compilation failure due to overload of virtual function 2017-05-24 21:19:48 +00:00
mozilla [test] Fix test status file simulator_run not evaluate to boolean error 2017-06-28 21:32:19 +00:00
preparser
promises-aplus
test262 [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
unittests [heap] Rework ASLR for base::Platform::VirtualMemory 2017-07-14 07:15:40 +00:00
wasm-spec-tests [wasm][x64] Add an additional stack check for functions with big frames 2017-07-13 13:43:04 +00:00
webkit [runtime] Create only one instance of %ThrowTypeError%. 2017-07-10 08:26:02 +00:00
bot_default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
bot_default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
BUILD.gn [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
optimize_for_size.gyp
optimize_for_size.isolate
perf.gyp
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00