summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing/parameters.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-05-21 13:06:01 -0700
committerGitHub <noreply@github.com>2024-05-21 13:06:01 -0700
commit326bfcd7d9f6927e28d106a6cd6e9c408a0f6a0d (patch)
tree6256b352df1a456cf56908a537de4d2830d32b33 /src/tools/fuzzing/parameters.h
parent5999c996c36abeba912599b5fba83d0b2989ed4c (diff)
downloadbinaryen-326bfcd7d9f6927e28d106a6cd6e9c408a0f6a0d.tar.gz
binaryen-326bfcd7d9f6927e28d106a6cd6e9c408a0f6a0d.tar.bz2
binaryen-326bfcd7d9f6927e28d106a6cd6e9c408a0f6a0d.zip
Fuzzer: Better fuzzing of globals (#6611)
With this PR we generate global.gets in globals, which we did not do before. We do that by replacing makeConst (the only thing we did before, for the contents of globals) with makeTrivial, and add code to makeTrivial to sometimes make a global.get. When no suitable global exists, makeGlobalGet will emit a constant, so there is no danger in trying. Also raise the number of globals a little. Also explicitly note the current limitation of requiring all tuple globals to contain tuple.make and nothing else, including not global.get, and avoid adding such invalid global.gets in tuple globals in the fuzzer.
Diffstat (limited to 'src/tools/fuzzing/parameters.h')
-rw-r--r--src/tools/fuzzing/parameters.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/fuzzing/parameters.h b/src/tools/fuzzing/parameters.h
index 51531681b..eede193a7 100644
--- a/src/tools/fuzzing/parameters.h
+++ b/src/tools/fuzzing/parameters.h
@@ -30,7 +30,7 @@ constexpr int MAX_PARAMS = 10;
constexpr int MAX_VARS = 20;
// The maximum number of globals in a module.
-constexpr int MAX_GLOBALS = 20;
+constexpr int MAX_GLOBALS = 30;
// The maximum number of tuple elements.
constexpr int MAX_TUPLE_SIZE = 6;