v8/test/mjsunit/wasm
Andreas Haas adad7e6ee6 [wasm] Remove the state from tasks of an AsyncCompileJob
There exists a hidden assumption in V8 that neither foreground nor
background tasks own any memory. For asynchronous WebAssembly
compilation this assumption was wrong, which causes crashes when V8 shut
down before the compilation finished.

With this CL I change the way asynchrous compilation happens. In the
existing implementation each compilation stage provided its own task
which could be spawned either in foreground or background. With this CL
each stage only provides a state, and a generic CompileTask executes on
that state. There exists exactly one state at a time.

To have exactly one state at a time I combined the stages
ExecuteCompilationUnits and FinishCompilationUnits to a single stage. In
addition I removed the WaitForBackgroundTasks stage and added a
CancelableTaskManager to the AsyncCompileJob instead to do the waiting.

BUG=v8:6436
R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I2eb61f74235c65524ce720c474eaf99ae7472c81
Reviewed-on: https://chromium-review.googlesource.com/532993
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45908}
2017-06-13 14:26:51 +00:00
..
embenchen
adapter-frame.js
add-getters.js
asm-wasm-copy.js
asm-wasm-deopt.js
asm-wasm-exception-in-tonumber.js [asm.js] Fix source positions of ToNumber conversions. 2017-04-05 12:34:55 +00:00
asm-wasm-expr.js [asm.js] Fix source positions in for-statement parsing. 2017-04-19 08:53:57 +00:00
asm-wasm-f32.js
asm-wasm-f64.js
asm-wasm-heap.js
asm-wasm-i32.js
asm-wasm-literals.js [wasm][asm.js] Fix asm.js in tests to be more strictly valid. 2017-03-14 20:17:04 +00:00
asm-wasm-names.js
asm-wasm-stack.js [asm.js] Fix names for forward declared functions. 2017-04-04 07:55:54 +00:00
asm-wasm-stdlib.js
asm-wasm-switch.js
asm-wasm-u32.js
asm-wasm.js [asm.js] Ensure lookups of imports are non-observable. 2017-05-23 10:42:43 +00:00
asm-with-wasm-off.js Fix test to not teach ClusterFuzz ugly tricks. 2017-02-28 10:25:50 +00:00
async-compile.js Revert "Revert "Reland "Introducing an event loop mechanism for d8.""" 2017-05-10 18:34:10 +00:00
calls.js
compilation-limits-asm.js [wasm] [cleanup] Avoid shouting WASM 2017-06-09 16:24:19 +00:00
compilation-limits.js Revert "Revert "[wasm] Remove override-ability from async compile and instantiate."" 2017-05-24 15:55:04 +00:00
compiled-module-management.js
compiled-module-serialization.js [wasm] Fix serialization after instantiation 2017-03-29 21:22:57 +00:00
data-segments.js
divrem-trap.js
ensure-wasm-binaries-up-to-date.js
errors.js [wasm] Bumped DEPS for public js api tests, fixed failures. 2017-04-11 20:09:20 +00:00
exceptions.js [wasm] Make prototype flags experimental 2017-05-31 14:18:08 +00:00
export-table.js
ffi-error.js [wasm] Fix wasm to js wrapper on ia32 for i64 return 2017-03-15 16:14:19 +00:00
ffi.js
float-constant-folding.js [wasm] Do not fold f32-to-f64 and f64-to-f32 conversions. 2017-02-03 12:05:29 +00:00
function-names.js [wasm] Implement extensible name section 2017-04-07 16:31:47 +00:00
function-prototype.js
gc-buffer.js [wasm] [cleanup] Avoid shouting WASM 2017-06-09 16:24:19 +00:00
gc-frame.js
gc-stress.js [mjsunit] Remove non-existing flags from tests. 2017-05-02 08:53:51 +00:00
globals.js [wasm] Inspect right control frames for unreachable flag 2017-02-16 14:12:01 +00:00
graceful_shutdown.js [wasm] Remove the state from tasks of an AsyncCompileJob 2017-06-13 14:26:51 +00:00
grow-memory.js
huge-memory.js [wasm] add a test case for 3GB memory 2017-04-26 05:09:03 +00:00
import-memory.js [wasm] Memory buffer should be detached after Memory.Grow 2017-01-26 22:15:59 +00:00
import-table.js
incrementer.wasm [wasm] Accept version 0x1 binaries. 2017-02-09 02:09:47 +00:00
indirect-calls.js [wasm] Fix test utils and tests 2017-03-22 14:04:10 +00:00
indirect-tables.js [wasm] Fix emitting element section in wasm-module-builder.js 2017-06-12 12:45:36 +00:00
instance-gc.js
instance-memory-gc-stress.js
instantiate-module-basic.js Revert "Revert "Reland "Introducing an event loop mechanism for d8.""" 2017-05-10 18:34:10 +00:00
instantiate-run-basic.js [wasm] instantiate expressed in terms of compile 2017-04-18 01:31:16 +00:00
interpreter-mixed.js [wasm] Fix runtime call syntax 2017-05-23 09:26:56 +00:00
interpreter.js [wasm] [cleanup] Avoid shouting WASM 2017-06-09 16:24:19 +00:00
js-api.js [tests] Remove space between '%' and runtime function names in mjsunit 2017-06-02 23:07:41 +00:00
jsapi-harness.js [wasm] Update the wasm spec tests. 2017-06-02 15:25:00 +00:00
memory-instance-validation.js
memory-size.js
memory.js
module-memory.js
names.js
OWNERS
parallel_compilation.js
params.js
receiver.js
stack.js [wasm] [cleanup] Avoid shouting WASM 2017-06-09 16:24:19 +00:00
stackwalk.js
start-function.js [wasm] Fix tests and improve error message 2017-04-11 16:22:33 +00:00
table.js
test-import-export-wrapper.js
test-wasm-module-builder.js
trap-location.js
unicode-validation.js [wasm] Also kBadChar is a valid utf8 character 2017-05-23 09:28:06 +00:00
unreachable-validation.js [wasm] Inspect right control frames for unreachable flag 2017-02-16 14:12:01 +00:00
unreachable.js
verify-module-basic-errors.js
wasm-api-overloading.js [wasm] Remove support for overloading async APIs. 2017-06-06 05:47:03 +00:00
wasm-constants.js [wasm] Decode and use module name 2017-06-12 10:58:48 +00:00
wasm-default.js
wasm-module-builder.js [wasm] Fix emitting element section in wasm-module-builder.js 2017-06-12 12:45:36 +00:00
wasm-object-api.js