]> Cypherpunks repositories - gostls13.git/commit
runtime: add lock rank partial-order edge between fin and mheap
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 19 Oct 2020 17:55:55 +0000 (17:55 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 19 Oct 2020 23:35:51 +0000 (23:35 +0000)
commit2754d911641c3a4569f48d61c541fc2ac395d23b
tree7ea08461596fe8e4d25274a229ec868e95af1fb9
parent70cad2744b57691962645681722ce756e81791c1
runtime: add lock rank partial-order edge between fin and mheap

finlock may be held across a write barrier, which could then acquire the
mheap lock. Notably, this occurs in the mp.unlockf write in gopark where
finlock is held by the finalizer goroutines and is going to sleep.

Fixes #42062.

Change-Id: Icf76637ae6fc12795436272633dca3d473780875
Reviewed-on: https://go-review.googlesource.com/c/go/+/263678
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/runtime/lockrank.go