v8/test
Michael Lippautz 55d00c95b0 [heap] Fix ArrayBufferTracker accessing already swept byte length
The tracker needs to maintain the byte length as there is no order guarantee
when sweeping pages and the byte length may be a HeapNumber that is stored on a
different page.

The abstraction for ArrayBuffers is left untouched. We distinguish between the
following cases:
1. Regular AB (backing_store and bye_length should be used)
2. AB allocated using kReservation but not part of wasm
3. AB allocated using kReservation and part of wasm

In practice, 2. does not exist, but we still maintain "allocation_base" and
"allocation_length" which fall back to backing_store and byte_length in this
case. The problematic part is that they look like innocent getters on the
object but actually refer to different data structures or on-heap objects.

Since 2. does not exist, and 3. looks up the bounds in its own tracker, it is
fine for ArrayBufferTracker to pass backing_store and tracked byte_length.

Bug: v8:7701
Change-Id: Ib89d5fe94fce5cef8e5d8343a5415a3b9ad0deba
Reviewed-on: https://chromium-review.googlesource.com/1039385
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52923}
2018-05-02 18:16:18 +00:00
..
benchmarks Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
cctest [heap] Fix ArrayBufferTracker accessing already swept byte length 2018-05-02 18:16:18 +00:00
common [iwyu] Wasm iwyu. 2018-04-30 08:13:51 +00:00
debugger [runtime] Do not refer directly to the closure stored in the context 2018-04-25 17:24:02 +00:00
fuzzer [arm64] Use direct calls where possible. 2018-04-30 15:02:27 +00:00
inspector Reland "[inspector] added timeout for Debugger.evaluateOnCallFrame method" 2018-04-26 15:08:52 +00:00
intl Fix the fast path for locale canonicalization 2018-04-26 18:10:04 +00:00
js-perf-test Gracefully fail BigInt TypedArray.p.sort benchmarks. 2018-04-19 12:21:10 +00:00
memory [snapshot] Track deserialization time in Memory benchmark 2018-05-02 13:34:47 +00:00
message [mjsunit] Cleanup assertPromiseResult and add tests 2018-04-30 11:56:54 +00:00
mjsunit [map] Normalize hole for formatting an exception 2018-05-02 12:55:47 +00:00
mkgrokdump [builtins] Re-enable embedded builtins 2018-04-17 08:27:48 +00:00
mozilla [test] Skip flaky test 2018-04-06 15:19:34 +00:00
preparser Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
test262 Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts. Bug: v8:7705 2018-05-01 15:27:59 +00:00
unittests Revert "[parser] Slice the source string where possible" 2018-05-02 15:32:13 +00:00
wasm-spec-tests [wasm] Update spec tests 2018-04-25 12:02:21 +00:00
webkit [builtins] Properly reject immediately throwing thenables. 2018-04-24 07:55:00 +00:00
BUILD.gn Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00