diff options
author | Alon Zakai <azakai@google.com> | 2023-03-13 12:10:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 12:10:10 -0700 |
commit | 831c2f93aa49f6ef4ff7cf33a5b0c7b0757f1cef (patch) | |
tree | 77b0216a0a286928a99c802b1f27d311929c6bba /src/wasm-binary.h | |
parent | b280366c6e4f81d9483aed7c38c957257ac3396b (diff) | |
download | binaryen-831c2f93aa49f6ef4ff7cf33a5b0c7b0757f1cef.tar.gz binaryen-831c2f93aa49f6ef4ff7cf33a5b0c7b0757f1cef.tar.bz2 binaryen-831c2f93aa49f6ef4ff7cf33a5b0c7b0757f1cef.zip |
Fuzzer: Avoid emitting massive nested structs (#5564)
The nesting limit of around 20 was enough to cause exponential blowup. A 20K
input file lead to a 2GB wasm in one case I saw (!) which takes many seconds to
fuzz.
Instead, reduce the limit, and also check if random tells us that the random
input is done; when that's done we should stop, which limits us to O(input size).
Also do this for non-nullable types, and handle that in globals (we cannot emit a
RefAsNulNull there, so switch the global type if necessary).
Diffstat (limited to 'src/wasm-binary.h')
0 files changed, 0 insertions, 0 deletions