diff options
author | Alon Zakai <azakai@google.com> | 2024-05-21 13:06:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 13:06:01 -0700 |
commit | 326bfcd7d9f6927e28d106a6cd6e9c408a0f6a0d (patch) | |
tree | 6256b352df1a456cf56908a537de4d2830d32b33 /src/tools/fuzzing/parameters.h | |
parent | 5999c996c36abeba912599b5fba83d0b2989ed4c (diff) | |
download | binaryen-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.h | 2 |
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; |