Index: test/fuzzer/wasm.cc |
diff --git a/test/fuzzer/wasm.cc b/test/fuzzer/wasm.cc |
index 933be71344ac36b40fd934dea1f6665cd7ba542a..59a4c60df532dbe8fc0d8fc43bf3f6958b6429c0 100644 |
--- a/test/fuzzer/wasm.cc |
+++ b/test/fuzzer/wasm.cc |
@@ -17,6 +17,8 @@ |
#include "test/fuzzer/fuzzer-support.h" |
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
+ unsigned int flag_value = v8::internal::FLAG_wasm_max_mem_pages; |
+ v8::internal::FLAG_wasm_max_mem_pages = 32; |
v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get(); |
v8::Isolate* isolate = support->GetIsolate(); |
v8::internal::Isolate* i_isolate = |
@@ -34,5 +36,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
v8::internal::wasm::testing::SetupIsolateForWasmModule(i_isolate); |
v8::internal::wasm::testing::CompileAndRunWasmModule( |
i_isolate, data, data + size, v8::internal::wasm::kWasmOrigin); |
+ v8::internal::FLAG_wasm_max_mem_pages = flag_value; |
return 0; |
} |