From 874fc0897484d97cf94c0eb898ca5fabe7a9b34a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 10 Oct 2017 10:10:22 -0700 Subject: fix wasm-builder set_global creation - we must call finalize, as the value may be unreachable (#1216) --- src/wasm-builder.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 4591c9c0d..cca97a869 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -192,6 +192,7 @@ public: auto* ret = allocator.alloc(); ret->name = name; ret->value = value; + ret->finalize(); return ret; } Load* makeLoad(unsigned bytes, bool signed_, uint32_t offset, unsigned align, Expression *ptr, WasmType type) { -- cgit v1.2.3