From b3e92cf28603ef6f6fafc9f9b724b84253a4355c Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Sun, 5 Nov 2023 14:42:31 -0300 Subject: [PATCH] runtime: fix badmorestackg0 never called on wasm Previously, badmorestackg0 was never called since it was behind a g == R1 check, R1 holding g.m. This is clearly wrong, since we want to check if g == g0. Fixed by using R2 that holds the value of g0. Fixes [reserved] --- src/runtime/asm_wasm.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/asm_wasm.s b/src/runtime/asm_wasm.s index 9cd8b5a99f..a96115b02c 100644 --- a/src/runtime/asm_wasm.s +++ b/src/runtime/asm_wasm.s @@ -223,7 +223,7 @@ TEXT runtime·morestack(SB), NOSPLIT, $0-0 // Cannot grow scheduler stack (m->g0). Get g - Get R1 + Get R2 I64Eq If CALLNORESUME runtime·badmorestackg0(SB)