Line data Source code
1 : // Copyright 2015 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #include "test/unittests/test-utils.h"
6 :
7 : #include "src/v8.h"
8 :
9 : #include "src/objects-inl.h"
10 : #include "src/wasm/function-body-decoder.h"
11 : #include "src/wasm/wasm-module-builder.h"
12 :
13 : #include "test/common/wasm/test-signatures.h"
14 :
15 : namespace v8 {
16 : namespace internal {
17 : namespace wasm {
18 :
19 2 : class WasmModuleBuilderTest : public TestWithZone {
20 : protected:
21 : void AddLocal(WasmFunctionBuilder* f, ValueType type) {
22 : uint16_t index = f->AddLocal(type);
23 : f->EmitGetLocal(index);
24 : }
25 : };
26 :
27 15444 : TEST_F(WasmModuleBuilderTest, Regression_647329) {
28 : // Test crashed with asan.
29 : ZoneBuffer buffer(zone());
30 : const size_t kSize = ZoneBuffer::kInitialSize * 3 + 4096 + 100;
31 1 : byte data[kSize] = {0};
32 1 : buffer.write(data, kSize);
33 1 : }
34 :
35 : } // namespace wasm
36 : } // namespace internal
37 9264 : } // namespace v8
|