diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-09-12 13:37:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-09-27 13:07:55 -0700 |
commit | 27af98deb91d1d64be44cdf12f01833b677fbf34 (patch) | |
tree | 61aa683b01192259297bcc64db092a2e17009ac7 /src/wasm.h | |
parent | c69253378014ffc451adf916d017d8f21faae77c (diff) | |
download | binaryen-27af98deb91d1d64be44cdf12f01833b677fbf34.tar.gz binaryen-27af98deb91d1d64be44cdf12f01833b677fbf34.tar.bz2 binaryen-27af98deb91d1d64be44cdf12f01833b677fbf34.zip |
fuzzing improvements:
* randomize initial memory
* low chance to have tiny blocks
* decent chance to have a branch back to the loop top
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index 50646e39f..c31aac9c1 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -654,8 +654,7 @@ public: Expression* offset; std::vector<Name> data; Segment() {} - Segment(Expression* offset) : offset(offset) { - } + Segment(Expression* offset) : offset(offset) {} Segment(Expression* offset, std::vector<Name>& init) : offset(offset) { data.swap(init); } @@ -685,6 +684,7 @@ public: Expression* offset; std::vector<char> data; // TODO: optimize Segment() {} + Segment(Expression* offset) : offset(offset) {} Segment(Expression* offset, const char* init, Address size) : offset(offset) { data.resize(size); std::copy_n(init, size, data.begin()); |