From 00858e42f68ee25a9b66f3f4df52c1b5b3763f6d Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Thu, 9 Mar 2023 16:25:59 -0800 Subject: [PATCH] [wasm] Fix missing branch target table update (#83236) The jiterpreter was failing to add unconditional branch targets to the branch target table, which could cause branches targeting them to fail and make the trace bail out. --- src/mono/wasm/runtime/jiterpreter-trace-generator.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/runtime/jiterpreter-trace-generator.ts b/src/mono/wasm/runtime/jiterpreter-trace-generator.ts index 38e9647..8f44a3b 100644 --- a/src/mono/wasm/runtime/jiterpreter-trace-generator.ts +++ b/src/mono/wasm/runtime/jiterpreter-trace-generator.ts @@ -2396,6 +2396,7 @@ function emit_branch ( // Simple branches are enabled and this is a forward branch. We // don't need to wrap things in a block here, we can just exit // the current branch block after updating eip + builder.branchTargets.add(destination); builder.ip_const(destination); builder.local("eip", WasmOpcode.set_local); builder.appendU8(WasmOpcode.br); -- 2.7.4