Index: test/fuzzer/wasm-code.cc |
diff --git a/test/fuzzer/wasm-code.cc b/test/fuzzer/wasm-code.cc |
index 0ff3bb514e9c29ddb1c751a11ce2d38fb2732c8b..41e12987e079542cc03e0161338011c32dad2a85 100644 |
--- a/test/fuzzer/wasm-code.cc |
+++ b/test/fuzzer/wasm-code.cc |
@@ -68,6 +68,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
v8::internal::wasm::WasmFunctionBuilder* f = |
builder.AddFunction(sigs.i_iii()); |
f->EmitCode(data, static_cast<uint32_t>(size)); |
+ uint8_t end_opcode = kExprEnd; |
+ f->EmitCode(&end_opcode, 1); |
f->ExportAs(v8::internal::CStrVector("main")); |
ZoneBuffer buffer(&zone); |