v8/test
eholk 3e1db847b3 [wasm] Syntax- and Type-aware Fuzzer
This is the beginning of a new fuzzer that generates
correct-by-construction Wasm modules. This should allow us to better
exercise the compiler and correctness aspects of fuzzing. It is based off
of ahaas' original Wasm fuzzer.

At the moment, it can generate expressions made up of most binops, and
also nested blocks with unconditional breaks. Future CLs will add
additional constructs, such as br_if, loops, memory access, etc.

The way the fuzzer works is that it starts with an array of arbitrary
data provided by libfuzzer. It uses the data to generate an expression.
Care is taken to make use of the entire string. Basically, the
generator has a bunch of grammar-like rules for how to construct an
expression of a given type. For example, an i32 can be made by adding
two other i32s, or by wrapping an i64. The process then continues
recursively until all the data is consumed.

We generate an expression from a slice of data as follows:
* If the slice is less than or equal to the size of the type (e.g. 4
  bytes for i32), then it will emit the entire slice as a constant.
* Otherwise, it will consume the first 4 bytes of the slice and use
  this to select which rule to apply. Each rule then consumes the
  remainder of the slice in an appropriate way. For example:
  * Unary ops use the remainder of the slice to generate the argument.
  * Binary ops consume another four bytes and mod this with the length
    of the remaining slice to split the slice into two parts. Each of
    these subslices are then used to generate one of the arguments to
    the binop.
  * Blocks are basically like a unary op, but a stack of block types is
    maintained to facilitate branches. For blocks that end in a break,
    the first four bytes of a slice are used to select the break depth
    and the stack determines what type of expression to generate.
The goal is that once this generator is complete, it will provide a one
to one mapping between binary strings and valid Wasm modules.

Review-Url: https://codereview.chromium.org/2658723006
Cr-Commit-Position: refs/heads/master@{#43289}
2017-02-17 17:06:29 +00:00
..
benchmarks
cctest [csa] Rename GotoUnless to GotoIfNot. 2017-02-17 17:04:18 +00:00
common [iwyu, wasm] Remove unallowed includes to objects-inl.h from wasm. 2017-02-13 15:05:37 +00:00
debugger [debug] Handle OOM events in debugger tests 2017-02-16 11:48:22 +00:00
fuzzer [wasm] Syntax- and Type-aware Fuzzer 2017-02-17 17:06:29 +00:00
inspector [debugger] expose side-effect free evaluate to inspector. 2017-02-10 17:06:22 +00:00
intl NumberFormat: default mnsd value is 1 2017-02-14 17:12:49 +00:00
js-perf-test [tests] Add js-perf-test for %TypedArray%.prototype.sort 2017-02-15 14:48:42 +00:00
memory
message Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
mjsunit [elements] Check if the backing store has been neutered for indexOf 2017-02-17 12:49:21 +00:00
mozilla [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace] 2017-02-16 09:21:37 +00:00
preparser
promises-aplus
test262 Implement new Function.prototype.toString --harmony-function-tostring 2017-02-16 20:19:24 +00:00
unittests [ic] Introduce StoreOwnIC. 2017-02-17 15:55:33 +00:00
webkit Unify TypeError messages 2017-02-13 10:27:03 +00:00
bot_default.gyp
bot_default.isolate
BUILD.gn Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00
default.gyp
default.isolate
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