Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: test/fuzzer/wasm-code.cc

Issue 2634943002: [wasm] Add the 'end' opcode at the end of the fuzzer input (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/fuzzer/wasm-call.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/fuzzer/wasm-call.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698