]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] runtime: fix panic if newstack at runtime.acquireLockRank
authorchainhelen <chainhelen@gmail.com>
Fri, 21 Aug 2020 16:44:52 +0000 (16:44 +0000)
committerDmitri Shuralyov <dmitshur@golang.org>
Wed, 2 Sep 2020 12:57:08 +0000 (12:57 +0000)
commita269e5f9391ee462cd94ccfb59c8c4460d4a7eb7
tree8d66a88b2811aa29c72d3cce8758f789102d3d00
parent0ffc5672df75accd06fb7477c46d4a7d1740401d
[release-branch.go1.15] runtime: fix panic if newstack at runtime.acquireLockRank

Process may crash becaues acquireLockRank and releaseLockRank may
be called in nosplit context. With optimizations and inlining
disabled, these functions won't get inlined or have their morestack
calls eliminated.
Nosplit is not strictly required for lockWithRank, unlockWithRank
and lockWithRankMayAcquire, just keep consistency with lockrank_on.go
here.

Updates #40843.
Fixes #40845.

Change-Id: I5824119f98a1da66d767cdb9a60dffe768f13c81
GitHub-Last-Rev: 38fd3ccf6ea03b670c7561c060ccdbccc42fff40
GitHub-Pull-Request: golang/go#40844
Reviewed-on: https://go-review.googlesource.com/c/go/+/248878
Reviewed-by: Dan Scales <danscales@google.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit b246c0e12fd41caf45a0f81eaa4f8fe249fbbc01)
Reviewed-on: https://go-review.googlesource.com/c/go/+/252339
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
src/runtime/lockrank_off.go