]> Cypherpunks repositories - gostls13.git/commit
runtime: make mSpanStateBox accessors nosplit
authorKeith Randall <khr@golang.org>
Mon, 19 Sep 2022 21:26:05 +0000 (17:26 -0400)
committerKeith Randall <khr@golang.org>
Mon, 19 Sep 2022 21:57:04 +0000 (21:57 +0000)
commitf1b7b2fc52947711b8e78f7078c9e0bda35320d3
tree66b9f64785def13dd6dee5027c26353d30aa257d
parent2d741947d8931325576427b3699d1af20e7be7cf
runtime: make mSpanStateBox accessors nosplit

get, at least, is called from typedmemclr which must not be interruptible.
These were previously nosplit by accident before CL 424395 (the only
call they had was an intrinsic, so they were leaf functions, so they had
no prologue). After CL 424395 they contained a call (in noinline builds),
thus had a prologue, thus had a suspension point.

I have no idea how we might test this.

This is another motivating use case for having a nosplitrec directive
in the runtime.

Fixes #55156
Fixes #54779
Fixes #54906
Fixes #54907

Change-Id: I851d733d71bda7172c4c96e027657e22b499ee00
Reviewed-on: https://go-review.googlesource.com/c/go/+/431919
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/mbarrier.go
src/runtime/mheap.go