binaryen
binaryen copied to clipboard
Fuzzer: Fix tuple globals with non-constant children
We fixed two problems when creating globals: that tuples must be tuple.make, and that global inits must be constant (which in rare cases they are not, if we run out of input bytes in the middle). However, there can be a dependence between them that we missed: the init might begin constant, but then if we need to fix it to be a tuple.make we can introduce something non-constant there.
Reorder them so we handle the non-constant issue at the end, after any tuple.make changes.