Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: test/mjsunit/regress/wasm/ast-fuzz-2.js

Issue 2658723006: [wasm] Syntax- and Type-aware Fuzzer (Closed)
Patch Set: Adding support for more binops, etc. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/fuzzer/wasm-compile.cc ('K') | « test/mjsunit/regress/wasm/ast-fuzz-1.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/wasm/ast-fuzz-2.js
diff --git a/test/mjsunit/regress/wasm/ast-fuzz-2.js b/test/mjsunit/regress/wasm/ast-fuzz-2.js
new file mode 100644
index 0000000000000000000000000000000000000000..684e17568b3b363f48dfd44adeb9385ec0de17f0
--- /dev/null
+++ b/test/mjsunit/regress/wasm/ast-fuzz-2.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+(function() {
+ var builder = new WasmModuleBuilder();
+ builder.addMemory(32, 32, false);
+ builder.addFunction("test", kSig_i_iii)
+ .addBodyWithEnd([
+// body:
+kExprBlock, 0x7e, // @1 i64
+ kExprI64Const, 0xa2, 0xed, 0xdd, 0xc5, 0xaa, 0xd4, 0xa8, 0xbb, 0xb7, 0x7f,
+ kExprEnd, // @14
+kExprI64Const, 0xba, 0xaa, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+kExprI64Const, 0xa2, 0xc5, 0x8a, 0x95, 0xaa, 0xd4, 0xa8, 0x80, 0x80, 0x00,
+kExprI64Const, 0xa2, 0xc5, 0x8a, 0x85, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+kExprI64Mul,
+kExprI64Const, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+kExprI64Const, 0xa2, 0xc5, 0x8a, 0x95, 0xaa, 0xd4, 0xa8, 0x80, 0x80, 0x00,
+kExprI64Mul,
+kExprI64Add,
+kExprI64Mul,
+kExprI64Mul,
+kExprI64Const, 0xef, 0xff, 0x8b, 0x95, 0x8a, 0x80, 0x80, 0x80, 0x80, 0x00,
+kExprI64GeS,
+kExprEnd, // @87
+ ])
+ .exportFunc();
+ var module = builder.instantiate();
+ assertEquals(1, module.exports.test(1, 2, 3));
+})();
« test/fuzzer/wasm-compile.cc ('K') | « test/mjsunit/regress/wasm/ast-fuzz-1.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698