From 8b0f05c5400f98e10077497423d84e80e9c32acb Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 24 Oct 2022 03:20:58 +0330 Subject: [PATCH] LibWasm: Allow vectors of up to 500M entries This usually shows up in custom sections, containing plain bytes. --- Userland/Libraries/LibWasm/Constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/Constants.h b/Userland/Libraries/LibWasm/Constants.h index 41e15a4740..5e2aaf58fb 100644 --- a/Userland/Libraries/LibWasm/Constants.h +++ b/Userland/Libraries/LibWasm/Constants.h @@ -40,7 +40,7 @@ static constexpr auto page_size = 64 * KiB; // These are not concretely defined by the spec, so the values are only defined by us. static constexpr auto minimum_stack_space_to_keep_free = 256 * KiB; // Note: Value is arbitrary and chosen by testing with ASAN static constexpr auto max_allowed_executed_instructions_per_call = 256 * 1024 * 1024; -static constexpr auto max_allowed_vector_size = 2 * MiB; +static constexpr auto max_allowed_vector_size = 500 * MiB; static constexpr auto max_allowed_function_locals_per_type = 42069; // Note: VERY arbitrary. }