From db6d6dc9049bf01423202a445e57450ae230e7c2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 17 Apr 2019 10:33:58 -0700 Subject: 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... --- src/wasm2js.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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: { -- cgit v1.2.3