From d6beda863e3a8825c8cfe656744cc8f99f47d048 Mon Sep 17 00:00:00 2001 From: limeidan Date: Thu, 19 Jun 2025 19:55:28 +0800 Subject: [PATCH] runtime: add reference to debugPinnerV1 This is intended to be used by debuggers, to keep heap memory reachable even if it isn't referenced from anywhere else. Change-Id: I1e900e02b4fe3a188f8173cec70f8de32122489b Reviewed-on: https://go-review.googlesource.com/c/go/+/682875 Reviewed-by: abner chenc Reviewed-by: Mark Freeman Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/runtime/asm_loong64.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/asm_loong64.s b/src/runtime/asm_loong64.s index 46ef00bab8..ee7f825e1f 100644 --- a/src/runtime/asm_loong64.s +++ b/src/runtime/asm_loong64.s @@ -70,8 +70,9 @@ nocgo: // start this M JAL runtime·mstart(SB) - // Prevent dead-code elimination of debugCallV2, which is + // Prevent dead-code elimination of debugCallV2 and debugPinnerV1, which are // intended to be called by debuggers. + MOVV $runtime·debugPinnerV1(SB), R0 MOVV $runtime·debugCallV2(SB), R0 MOVV R0, 1(R0) -- 2.51.0