From 577287728a8e8abbcbc6c96fdd49feb5a99ced0c Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 3 Nov 2021 16:28:51 -0400 Subject: [PATCH] runtime: clear upper half of sec in ARM walltime https://golang.org/cl/246763 accidentally changed this to assign the old value of vdsoPC to the upper half of sec as that is the last value in R1. The old value of vdsoPC is usually zero, so this typically works. However, the reentrant case will have a non-zero value, resulting in a bogus returned time. I am unsure if walltime is reachable from a signal handler, so this may never occur. Change-Id: I8562d6ec2a845fcffee9618d994b8ea57fbd199e Reviewed-on: https://go-review.googlesource.com/c/go/+/361159 Trust: Michael Pratt Run-TryBot: Michael Pratt TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- src/runtime/sys_linux_arm.s | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s index 3f30da7b54..65935de99f 100644 --- a/src/runtime/sys_linux_arm.s +++ b/src/runtime/sys_linux_arm.s @@ -360,6 +360,7 @@ finish: MOVW R1, m_vdsoPC(R5) MOVW R0, sec_lo+0(FP) + MOVW $0, R1 MOVW R1, sec_hi+4(FP) MOVW R2, nsec+8(FP) RET -- 2.50.0