From 4cb970fa052d5f2f5d29de60f612dc1e22fb81ee Mon Sep 17 00:00:00 2001 From: "Alon Zakai (kripken)" Date: Mon, 29 May 2017 20:08:48 -0700 Subject: trap on bad result types in shell-interface callTable --- src/shell-interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/shell-interface.h b/src/shell-interface.h index 076787c9b..ef92f40cd 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -156,6 +156,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { trap("callIndirect: bad argument type"); } } + if (func->result != result) { + trap("callIndirect: bad result type"); + } return instance.callFunctionInternal(func->name, arguments); } -- cgit v1.2.3