]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.1] time: prevent a panic from leaving the timer mutex held
authorAndrew Gerrand <adg@golang.org>
Mon, 22 Jul 2013 08:41:32 +0000 (18:41 +1000)
committerRuss Cox <rsc@golang.org>
Mon, 22 Jul 2013 08:41:32 +0000 (18:41 +1000)
commitb315b7ffffdf6d553292dc417a1a8913865b7611
tree3e98646e345fdb59b989c0643ad75e8c93224fbc
parente33810b29189e2a470e7003b0a519b624eedb651
[release-branch.go1.1] time: prevent a panic from leaving the timer mutex held

««« CL 10373047 / 974a69ed9fcf
time: prevent a panic from leaving the timer mutex held

When deleting a timer, a panic due to nil deref
would leave a lock held, possibly leading to a deadlock
in a defer. Instead return false on a nil timer.

Fixes #5745.

R=golang-dev, daniel.morsing, dvyukov, rsc, iant
CC=golang-dev
https://golang.org/cl/10373047

»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11666046
src/pkg/runtime/time.goc
src/pkg/time/sleep_test.go