mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 10:01:49 +00:00

PR-URL: https://github.com/nodejs/node/pull/49639 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
38 lines
958 B
C++
38 lines
958 B
C++
// Copyright 2015 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.
|
|
|
|
#include "test/unittests/test-utils.h"
|
|
|
|
#include "src/init/v8.h"
|
|
|
|
#include "src/objects/objects-inl.h"
|
|
#include "src/wasm/function-body-decoder.h"
|
|
#include "src/wasm/wasm-module-builder.h"
|
|
|
|
#include "test/common/wasm/test-signatures.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
namespace wasm {
|
|
|
|
class WasmModuleBuilderTest : public TestWithZone {
|
|
protected:
|
|
void AddLocal(WasmFunctionBuilder* f, ValueType type) {
|
|
uint16_t index = f->AddLocal(type);
|
|
f->EmitGetLocal(index);
|
|
}
|
|
};
|
|
|
|
TEST_F(WasmModuleBuilderTest, Regression_647329) {
|
|
// Test crashed with asan.
|
|
ZoneBuffer buffer(zone());
|
|
const size_t kSize = ZoneBuffer::kInitialSize * 3 + 4096 + 100;
|
|
uint8_t data[kSize] = {0};
|
|
buffer.write(data, kSize);
|
|
}
|
|
|
|
} // namespace wasm
|
|
} // namespace internal
|
|
} // namespace v8
|