mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: save/fetch g register during VDSO on linux/loong64
Like arm64, ppc64 and risv64, on loong64, the G register may be temporarily broken during a VDSO call. If a signal is received during a VDSO call, an invalid G may be obtained. See #34391. Change-Id: Iaffa8cce4f0ef8ef74225c355ec3c20ed238025f Reviewed-on: https://go-review.googlesource.com/c/go/+/426355 Reviewed-by: WANG Xuerui <git@xen0n.name> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: WANG Xuerui <git@xen0n.name> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
1b630b5b00
commit
42023d6f52
2 changed files with 41 additions and 5 deletions
|
|
@ -397,7 +397,7 @@ func preemptM(mp *m) {
|
|||
//go:nosplit
|
||||
func sigFetchG(c *sigctxt) *g {
|
||||
switch GOARCH {
|
||||
case "arm", "arm64", "ppc64", "ppc64le", "riscv64", "s390x":
|
||||
case "arm", "arm64", "loong64", "ppc64", "ppc64le", "riscv64", "s390x":
|
||||
if !iscgo && inVDSOPage(c.sigpc()) {
|
||||
// When using cgo, we save the g on TLS and load it from there
|
||||
// in sigtramp. Just use that.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue