From 9a1853c38802559539e1260533cd1903723929ca Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 1 Jun 2021 20:10:05 +0430 Subject: [PATCH] LibWasm: Don't execute the last instruction in the frame after return --- Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp index dbce68e6e7..eb08889d25 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp @@ -449,7 +449,7 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi configuration.stack().entries().remove(start, end - start); // Jump past the call/indirect instruction - configuration.ip() = configuration.frame().expression().instructions().size() - 1; + configuration.ip() = configuration.frame().expression().instructions().size(); return; } case Instructions::br.value():