diff options
author | Alon Zakai <azakai@google.com> | 2023-02-28 17:15:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 01:15:10 +0000 |
commit | 53a6fcf53188823cbf60a24c980fe114f8ab7172 (patch) | |
tree | aed3dd72ccbf9db7ca71d903761a2c8b90602aab /src | |
parent | 356767e259cde364b0968bedf4ffd012d48737b5 (diff) | |
download | binaryen-53a6fcf53188823cbf60a24c980fe114f8ab7172.tar.gz binaryen-53a6fcf53188823cbf60a24c980fe114f8ab7172.tar.bz2 binaryen-53a6fcf53188823cbf60a24c980fe114f8ab7172.zip |
Fuzzer: Avoid local.get when not in a function (#5528)
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/fuzzing/fuzzing.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 6e728d3a6..c4c47ee23 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -1067,7 +1067,7 @@ Expression* TranslateToFuzzReader::_makeunreachable() { Expression* TranslateToFuzzReader::makeTrivial(Type type) { if (type.isConcrete()) { - if (oneIn(2)) { + if (oneIn(2) && funcContext) { return makeLocalGet(type); } else { return makeConst(type); |