diff options
author | Alon Zakai <azakai@google.com> | 2020-07-28 06:58:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 06:58:34 -0700 |
commit | 26f240c72dd62ed8a39f7466df99e51ec34487aa (patch) | |
tree | 67e7a8bac0b767e421764058f7accb5c3df32688 /test/dynamicLibrary.asm.js | |
parent | 32ab8bac04af52121c6985a9a019c0fdec957f03 (diff) | |
download | binaryen-26f240c72dd62ed8a39f7466df99e51ec34487aa.tar.gz binaryen-26f240c72dd62ed8a39f7466df99e51ec34487aa.tar.bz2 binaryen-26f240c72dd62ed8a39f7466df99e51ec34487aa.zip |
wasm2js: Don't remove an | 0 or >>> 0 in a boolean context (#2993)
It is usually fine to do if (x | 0) => if (x) since it just cares if the
value is 0 or not. However, if the cast turns it into 0, then that is
incorrect, which the fuzzer found as
-2147483648 + -2147483648 | 0
(the sum is 2^32, which | 0 is 0).
We can maybe look into doing this in a safe way, but for now
just remove it. It doesn't have a big impact on code size as this
is pretty rare (e.g. the minimal runtime code size test is not
broken by this).
Diffstat (limited to 'test/dynamicLibrary.asm.js')
0 files changed, 0 insertions, 0 deletions