diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-17 10:33:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 10:33:58 -0700 |
commit | db6d6dc9049bf01423202a445e57450ae230e7c2 (patch) | |
tree | b56adc607ed3f208ee8867bcf9bb9936145aff60 /src/wasm2js.h | |
parent | 93152948b0bc5d5a3a501f5a08bd864262d1957b (diff) | |
download | binaryen-db6d6dc9049bf01423202a445e57450ae230e7c2.tar.gz binaryen-db6d6dc9049bf01423202a445e57450ae230e7c2.tar.bz2 binaryen-db6d6dc9049bf01423202a445e57450ae230e7c2.zip |
wasm2js: Fix unaligned loads and stores (#2015)
We forgot to set them as unsigned, which meant that we were reading uninitialized memory when checking that field, which mostly worked, except if it previously contained something...
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r-- | src/wasm2js.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h index d563409f9..ac325ce13 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -1164,6 +1164,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m, Function* func, IString resul Load load = *curr; load.ptr = &get; load.bytes = 1; // do the worst + load.signed_ = false; Ref rest; switch (curr->type) { case i32: { |