- 02 Feb, 2018 1 commit
-
-
Clemens Hammacher authored
We were generating sequences of instructions for generating i32, i64, f32 and f64 values, but not for generating an instruction without a result value. This CL adds that. R=ahaas@chromium.org Change-Id: I5c17d4182dfc6a827c7cdaa611ba7941b9c5d12f Reviewed-on: https://chromium-review.googlesource.com/897790Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#51058}
-
- 30 Jan, 2018 3 commits
-
-
Clemens Hammacher authored
This adds support for set_global and get_global. R=ahaas@chromium.org Change-Id: I08bfa3c23080f473616970e9894cfb6e55a4f76d Reviewed-on: https://chromium-review.googlesource.com/890744 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50963}
-
Clemens Hammacher authored
Turns out we never generated if blocks or if-else blocks so far. R=ahaas@chromium.org Change-Id: I942dbc614b5b489094f5b029a70c40b336d09fa4 Reviewed-on: https://chromium-review.googlesource.com/890451 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50961}
-
Clemens Hammacher authored
The wasm compile fuzzer generated {br} instructions, but no {br_if} so far. This CL adds that. R=ahaas@chromium.org Change-Id: Ib5e47a26d96e88498104e0d57b9a49b74b7356eb Reviewed-on: https://chromium-review.googlesource.com/890450Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50950}
-
- 11 Jan, 2018 1 commit
-
-
Clemens Hammacher authored
set_local was implemented before, but not added to any list of alternatives. tee_local is now additionally implemented and added. R=ahaas@chromium.org Change-Id: I51f0b35c7b507e8af06efd1f9baac30790f28a3b Reviewed-on: https://chromium-review.googlesource.com/860460Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50505}
-
- 04 Jan, 2018 1 commit
-
-
Clemens Hammacher authored
This adds support for get_local and set_local to the wasm compile fuzzer. Each function will have between 0 and 32 locals of random type. For set_local, we generate a value of the respective type and store it in the local. For get_local, we load any local and convert it to the wanted type. Note that with get_local, we now also check that parameters are passed correctly between functions. Drive-by: Fix parameters passed to the main function (was [1,2,3] for the interpreter, but [1,1,1] for compiled code). R=ahaas@chromium.org, eholk@chromium.org Change-Id: I38e85fe25b1fb4ac298fa81ec8e33711294e78bb Reviewed-on: https://chromium-review.googlesource.com/847535Reviewed-by:
Eric Holk <eholk@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50355}
-
- 21 Dec, 2017 3 commits
-
-
Clemens Hammacher authored
The wasm compile fuzzer now generates up to four functions with different signatures, and generates calls between them. R=ahaas@chromium.org CC=eholk@chromium.org Change-Id: I94903a80c78f8463dc1dee91ccf3be33c431e25a Reviewed-on: https://chromium-review.googlesource.com/839860 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50274}
-
Clemens Hammacher authored
I just fixed an annoying bug where I accidentally used DataRange more than once, leading to endless recursion. This CL avoids that by forbidding copying of DataRange. Instead, it's mostly passed by reference now. R=ahaas@chromium.org CC=eholk@chromium.org Change-Id: I3925548951645d13823ff42d9d833bde76d6cca6 Reviewed-on: https://chromium-review.googlesource.com/839762 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50273}
-
Clemens Hammacher authored
Adds support for emitting the drop opcode in the wasm compile fuzzer. R=ahaas@chromium.org CC=eholk@chromium.org Change-Id: Idb6f07f3f50ffda472107bd6276221e803c37152 Reviewed-on: https://chromium-review.googlesource.com/839760 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50267}
-
- 15 Nov, 2017 1 commit
-
-
Clemens Hammacher authored
Beside blocks, do also generate loops. Also, generalize generation of breaks such that they can happen anywhere, even outside of a block or loop. R=eholk@chromium.org Change-Id: Ib2f8c75913e97f331ec105fd87fc882bc5c04864 Reviewed-on: https://chromium-review.googlesource.com/771610Reviewed-by:
Eric Holk <eholk@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49392}
-
- 09 Nov, 2017 1 commit
-
-
Eric Holk authored
This was meant to be included in https://crrev.com/c/757129 but got missed somehow. The fuzzer was generating i64.store instructions with an i32 value argument instead of i64 like it should be. Bug: Change-Id: I5b5bcdb22b2ac3abe872e7ff0ab0019b5ecb9c98 Reviewed-on: https://chromium-review.googlesource.com/759148Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49270}
-
- 08 Nov, 2017 2 commits
-
-
Eric Holk authored
The Wasm AST-based fuzzer is supposed to create valid modules by construction. This change adds a CHECK to enforce this property. Additionally, this change exposed several cases where we were not generating valid modules before: * Block types did not match up correctly * Memory operations could have invalid alignments * Storing an i64 could generate an i32 argument incorrectly. This CL includes fixes for these issues as well. Bug: Change-Id: I1aef5532bc880367ec46dc6e79b2d4dbacf2f84b Reviewed-on: https://chromium-review.googlesource.com/757129 Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#49241}
-
Clemens Hammacher authored
We already have a helper method for generating a sequence of values. Reuse this instead of reimplementing the same thing two more times. R=ahaas@chromium.org CC=eholk@chromium.org Change-Id: Ifbbe1324173951156c1ec9bba84fd1aa4bcb2adb Reviewed-on: https://chromium-review.googlesource.com/758365Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49216}
-
- 07 Nov, 2017 1 commit
-
-
Eric Holk authored
Change-Id: Ib9bbcc22afbfc4d143e0eb65b1399f118bbc1e36 Reviewed-on: https://chromium-review.googlesource.com/754334 Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#49202}
-
- 06 Nov, 2017 3 commits
-
-
Clemens Hammacher authored
Instead of calling a number of member functions which return lambdas which are then wrapped in std::functions, just use the member functions directly. This allows to make the arrays with the alternatives constexpr instead of dynamically filling it on each call. R=eholk@chromium.org, ahaas@chromium.org Change-Id: Id1256f442f411eb291941911b25de24a985a9b34 Reviewed-on: https://chromium-review.googlesource.com/753722 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49146}
-
Eric Holk authored
This CL adds support for memory operations to the AST-based Wasm compile fuzzer. We've had several bugs in this area, so additional fuzz coverage should help detect these sooner. Change-Id: I28b5b95f1fc28939db764efe78de6d56bc61263c Reviewed-on: https://chromium-review.googlesource.com/742383 Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#49144}
-
Clemens Hammacher authored
Fix a stack overflow in the wasm_compile_fuzzer by limiting the recursion depth to 64. At this depth, we always just generate a constant expression. R=eholk@chromium.org, ahaas@chromium.org Bug: chromium:747348 Change-Id: I236c1e07b8cb2b6c9181c549e850eca34fac6ec6 Reviewed-on: https://chromium-review.googlesource.com/753329Reviewed-by:
Eric Holk <eholk@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49134}
-
- 04 Sep, 2017 1 commit
-
-
Clemens Hammacher authored
After this CL, we will enable cpplint checks for this directory on presubmit: https://chromium-review.googlesource.com/647807 R=mstarzinger@chromium.org Change-Id: Ie85e876a7245cc5c8d5bf9348c8841040a8edbe9 Reviewed-on: https://chromium-review.googlesource.com/647552Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#47791}
-
- 01 Sep, 2017 1 commit
-
-
Clemens Hammacher authored
This violates the style guide, and causes problems for jumbo builds. R=ahaas@chromium.org CC=mostynb@opera.com Bug: chromium:746958 Change-Id: Ic583c41b94bfd9ecdb31a9ccadb2e842861fe7f4 Reviewed-on: https://chromium-review.googlesource.com/647710Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#47774}
-
- 29 Aug, 2017 1 commit
-
-
Michael Starzinger authored
This adds support to specify the maximum memory size when building a WebAssembly module. Default is not maximum, one can be explicitly set. It is mainly used by the WebAssembly fuzzers to prevent OOMs. R=ahaas@chromium.org BUG=chromium:759973 Change-Id: Ibf5fa63a7e36e5f3b65ced528c73a65355d5632f Reviewed-on: https://chromium-review.googlesource.com/640386Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#47676}
-
- 09 Aug, 2017 1 commit
-
-
Mostyn Bramley-Moore authored
To speed up compilation times, jumbo allows files to be compiled together. This is a well known method ("unity builds") to both compile faster and create a poor man's "full program optimization". We are only interested in compile times. Background: https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md Note that jumbo builds are not enabled by default. To try this out, add use_jumbo_build=true to your GN args. BUG=chromium:746958 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ieb9fdccb6c135e9806dbed91c09a29aa8b8bee11 Reviewed-on: https://chromium-review.googlesource.com/579090 Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com> Reviewed-by:
Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#47239}
-
- 18 Jul, 2017 1 commit
-
-
Clemens Hammacher authored
This allows to reuse the class e.g. in the baseline compiler. R=titzer@chromium.org Change-Id: I7251af16e8c74f267834a9cefb676edf3c9f3a07 Reviewed-on: https://chromium-review.googlesource.com/570020Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#46735}
-
- 12 May, 2017 1 commit
-
-
Michael Starzinger authored
This makes sure that the order of exports as they appear in asm.js modules is maintained globally (not just per function) while being translated to a WASM module. R=clemensh@chromium.org TEST=mjsunit/asm/asm-validation BUG=chromium:720586 Change-Id: I8b26d717ae2f88467d41670bced901f196c7b3fc Reviewed-on: https://chromium-review.googlesource.com/503708 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#45277}
-
- 08 May, 2017 1 commit
-
-
Andreas Haas authored
With this CL we share code among the wasm fuzzers which construct a module and run it in the interpreter and as compiled code.The fuzzers themselves only contain the code now which creates the module and the parameters. BUG=v8:6325 R=eholk@chromium.org Change-Id: I1c2d8b013531c86cb27837f1b8ec89d2688c536b Reviewed-on: https://chromium-review.googlesource.com/490048 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/heads/master@{#45156}
-
- 25 Apr, 2017 1 commit
-
-
Clemens Hammacher authored
Instead of using the WASM_I32V_* macros (and other) from wasm-macro-gen.h, use the appropriate methods to encode LEB integers. This also saves some spaces for the wasm bytecode generated from asm.js. Specifically, this CL 1) renames EmitVarInt to EmitI32V and EmitVarUint to EmitU32V (on WasmFunctionBuilder). 2) introduces more methods on the WasmFunctionBuilder to emit i64v, u64v, f32, and f64 values. 3) uses the ZoneBuffer instead of a plain ZoneVector<char> in the WasmFunctionBuilder to build the body of the function. 4) introduces more helper functions on the ZoneBuffer to encode i64v, u64v, f32 and f64 values. R=ahaas@chromium.org Change-Id: Ifa59a6a67380ecf9a3823c382daf00855f5bc61e Reviewed-on: https://chromium-review.googlesource.com/486803Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#44842}
-
- 01 Mar, 2017 1 commit
-
-
Eric Holk authored
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=697191 Change-Id: I01ddd6824b1a79d86944ac766f5c2070e9b0c244 Reviewed-on: https://chromium-review.googlesource.com/448317Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#43522}
-
- 20 Feb, 2017 1 commit
-
-
titzer authored
R=ahaas@chromium.org, mythria@chromium.org BUG= Review-Url: https://codereview.chromium.org/2702123003 Cr-Commit-Position: refs/heads/master@{#43312}
-
- 17 Feb, 2017 1 commit
-
-
eholk authored
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}
-