mirror of
https://github.com/golang/go
synced 2024-11-18 01:54:45 -07:00
runtime: fix stack split at bad time when disable inlining
key32 is called between entersyscallblock and exitsyscall stack split may occur if disable inlining and the G is preempted Fix the problem by describing key32 as nosplit function Fixes #20510 Change-Id: I1f0787995936f34ef0052cf79fde036f1b338865 Reviewed-on: https://go-review.googlesource.com/44390 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
9acd814c2a
commit
91a80cc174
@ -38,6 +38,7 @@ const (
|
||||
// affect mutex's state.
|
||||
|
||||
// We use the uintptr mutex.key and note.key as a uint32.
|
||||
//go:nosplit
|
||||
func key32(p *uintptr) *uint32 {
|
||||
return (*uint32)(unsafe.Pointer(p))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user