aboutsummaryrefslogtreecommitdiff
path: root/src/internal/pkgbits
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2022-07-20 17:44:45 -0400
committerAustin Clements <austin@google.com>2022-08-04 15:31:49 +0000
commit44ff9bff0cd02642c37cce0223d25dc57230c8d2 (patch)
tree0c9e86833260775d3615837bf880cf3679be003a /src/internal/pkgbits
parentf42dc0de74f83d39e5ca1af72fc5334c73bd41f9 (diff)
downloadgo-44ff9bff0cd02642c37cce0223d25dc57230c8d2.tar.xz
runtime: clean up panic and deadlock lock ranks
I'm not entirely sure why these locks are currently ranked "deadlock < panic" since we drop panic before acquiring deadlock, and we actually want deadlock to be below panic because panic is implicitly below everything else and we want deadlock to be, too. My best guess is that we had this edge because we intentionally acquire deadlock twice to deadlock, and that causes the lock rank checking to panic on the second acquire. Fix this in a more sensible way by capturing that deadlock can be acquired in a self-cycle and flipping the rank to "panic < deadlock" to express that deadlock needs to be under all other locks, just like panic. For #53789. Change-Id: I8809e5d102ce473bd3ace0ba07bf2200ef60263f Reviewed-on: https://go-review.googlesource.com/c/go/+/418719 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/internal/pkgbits')
0 files changed, 0 insertions, 0 deletions