]> Cypherpunks repositories - gostls13.git/commit
runtime: properly search for cleanups in cleanup.stop
authorCarlos Amedee <carlos@golang.org>
Wed, 20 Nov 2024 22:20:41 +0000 (17:20 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 22 Nov 2024 20:28:23 +0000 (20:28 +0000)
commit7f049eac1b9378ecc4dddd43ebedeae0916c0606
treeca7dc055e69827855b96c902af06fac1f86adc7c
parent5050e37dbf723e3689721519eddb704dfdd7148e
runtime: properly search for cleanups in cleanup.stop

This change modifies the logic which searches for existing cleanups.
The existing search logic sets the next node to the current node
in certain conditions. This would cause future searches to loop
endlessly. The existing loop could convert non-cleanup specials into
cleanups and cause data corruption.

This also changes where we release the m while we are adding a
cleanup. We are currently holding onto an p-specific gcwork after
releasing the m.

Change-Id: I0ac0b304f40910549c8df114e523c89d9f0d7a75
Reviewed-on: https://go-review.googlesource.com/c/go/+/630278
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/mcleanup.go
src/runtime/mheap.go