Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: Panic if newstack at runtime.acquireLockRank [1.15 backport] #40845
Backport justification: This causes random runtime panics in programs compiled without optimizations (which mostly comes up when compiling for debugging; for example, Delve compiles targets without optimizations automatically). The fix is also extremely low-risk.
This doesn't need a 1.14 backport because it's part of lock rank checking, which was introduced in 1.15.
…uireLockRank 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: 38fd3cc GitHub-Pull-Request: #40844 Reviewed-on: https://go-review.googlesource.com/c/go/+/248878 Reviewed-by: Dan Scales <firstname.lastname@example.org> Run-TryBot: Emmanuel Odeke <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org> (cherry picked from commit b246c0e) Reviewed-on: https://go-review.googlesource.com/c/go/+/252339 Run-TryBot: Dmitri Shuralyov <email@example.com>