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

Unified Diff: test/fuzzer/wasm.cc

Issue 2648223004: [wasm] Change the constant kV8MaxWasmTableSize to a command line flag. (Closed)
Patch Set: Use the wasm-limits.h values in flag-definitions.h 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 | « src/wasm/wasm-module.cc ('k') | test/fuzzer/wasm-asmjs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/fuzzer/wasm.cc
diff --git a/test/fuzzer/wasm.cc b/test/fuzzer/wasm.cc
index 59a4c60df532dbe8fc0d8fc43bf3f6958b6429c0..f179450db0affc10ec275a6b28db10e23203c9d7 100644
--- a/test/fuzzer/wasm.cc
+++ b/test/fuzzer/wasm.cc
@@ -17,8 +17,10 @@
#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;
+ unsigned int max_mem_flag_value = v8::internal::FLAG_wasm_max_mem_pages;
+ unsigned int max_table_flag_value = v8::internal::FLAG_wasm_max_table_size;
v8::internal::FLAG_wasm_max_mem_pages = 32;
+ v8::internal::FLAG_wasm_max_table_size = 100;
v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
v8::Isolate* isolate = support->GetIsolate();
v8::internal::Isolate* i_isolate =
@@ -36,6 +38,7 @@ 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;
+ v8::internal::FLAG_wasm_max_mem_pages = max_mem_flag_value;
+ v8::internal::FLAG_wasm_max_table_size = max_table_flag_value;
return 0;
}
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/fuzzer/wasm-asmjs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698