summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/wasm/regress-775366.js
blob: 69a1f68dc0ec493ceb1974f6bf2d91f59dbad9a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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-module-builder.js");

(function BadTypeSection() {
  var data = bytes(
    kWasmH0,
    kWasmH1,
    kWasmH2,
    kWasmH3,

    kWasmV0,
    kWasmV1,
    kWasmV2,
    kWasmV3,

    kTypeSectionCode,
    5,
    2,
    0x60,
    0,
    0,
    13
  );

  assertFalse(WebAssembly.validate(data));
})();