]> Cypherpunks repositories - gostls13.git/commit
runtime: fix mishandling of timer zombie count
authorRuss Cox <rsc@golang.org>
Fri, 8 Mar 2024 02:17:04 +0000 (21:17 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 21:09:45 +0000 (21:09 +0000)
commit40cc3eb27869b2cbad5bf139191d02a1bc7b84b7
tree0666ee6630c176091e830256c75ee8c1da928b14
parent85bbb121413b5fe49238b2e089975f8b50b30de0
runtime: fix mishandling of timer zombie count

The timer zombie count was fundamentally racy and worked around
in CL 569995. We worked around that by ignoring underflow.
The fundamnental race was because t.ts was set before t was
inserted into ts. CL 564997 corrected that fundamental problem,
so now we can account for zombies completely accurately,
never seeing values less than zero. Do that.

Change-Id: Idfbccc6662af5935f29f2a06a35e8ea93929bed7
Reviewed-on: https://go-review.googlesource.com/c/go/+/569996
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/runtime/time.go