From fcdadc6c124c3a93c68b33c26207ecd5ead47273 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 6 Oct 2016 13:46:13 -0700 Subject: validate get_local type (#745) --- src/wasm-validator.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index f7e3b9db1..f17ed16d5 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -230,6 +230,9 @@ public: } } } + void visitGetLocal(GetLocal* curr) { + shouldBeTrue(isConcreteWasmType(curr->type), curr, "get_local must have a valid type - check what you provided when you constructed the node"); + } void visitSetLocal(SetLocal *curr) { shouldBeTrue(curr->index < getFunction()->getNumLocals(), curr, "set_local index must be small enough"); if (curr->value->type != unreachable) { -- cgit v1.2.3