aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/vdso_freebsd.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/vdso_freebsd.go b/src/runtime/vdso_freebsd.go
index feecada035..99ca1571a7 100644
--- a/src/runtime/vdso_freebsd.go
+++ b/src/runtime/vdso_freebsd.go
@@ -54,6 +54,9 @@ func binuptime(abs bool) (bt bintime) {
}
curr := atomic.Load(&timekeepSharedPage.current) // atomic_load_acq_32
+ if curr >= uint32(len(timehands)) {
+ return zeroBintime
+ }
th := &timehands[curr]
gen := atomic.Load(&th.gen) // atomic_load_acq_32
bt = th.offset