Index: test/mjsunit/regress/wasm/ast-fuzz-1.js |
diff --git a/test/mjsunit/regress/wasm/ast-fuzz-1.js b/test/mjsunit/regress/wasm/ast-fuzz-1.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a2b6a63cdd8a65b22d1f26e6364571f90cfebd9b |
--- /dev/null |
+++ b/test/mjsunit/regress/wasm/ast-fuzz-1.js |
@@ -0,0 +1,38 @@ |
+// 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: |
+kExprI64Const, 0xa2, 0xc5, 0x8a, 0x95, 0xaa, 0xd4, 0xa8, 0x80, 0x80, 0x00, |
+kExprI64Const, 0xff, 0xff, 0xeb, 0xa9, 0x85, 0x80, 0x80, 0x80, 0x80, 0x00, |
+kExprI64Mul, |
+kExprI64Const, 0xa8, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, |
+kExprI64Add, |
+kExprBlock, 0x7e, // @36 i64 |
+ kExprBlock, 0x7e, // @38 i64 |
+ kExprI64Const, 0xa2, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, |
+ kExprI64Const, 0xa2, 0xc5, 0x8a, 0x85, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, |
+ kExprI64Const, 0xa2, 0xc5, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, |
+ kExprI64Mul, |
+ kExprI64Mul, |
+ kExprEnd, // @75 |
+ kExprEnd, // @76 |
+kExprI64Add, |
+kExprI64Const, 0xa2, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, |
+kExprI64Const, 0xef, 0xff, 0x8b, 0x95, 0xaa, 0xd4, 0xa8, 0xd1, 0x80, 0x00, |
+kExprI64Mul, |
+kExprI64GeS, |
+kExprEnd, // @102 |
+ ]) |
+ .exportFunc(); |
+ var module = builder.instantiate(); |
+ assertEquals(1, module.exports.test(1, 2, 3)); |
+})(); |